From 0a5cc5df6fd87c40b24d2340e19879186639c413 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Mon, 24 Jun 2024 15:23:56 -0700 Subject: [PATCH] ui: group key, for menu-bar-style interactions, where you have several distinct boxes, but want one interaction to continuously flow between them --- src/df/gfx/df_gfx.c | 3 ++- src/raddbg/raddbg.h | 12 ++++++------ src/ui/generated/ui.meta.c | 6 ++++++ src/ui/generated/ui.meta.h | 11 +++++++++++ src/ui/ui.mdesk | 1 + src/ui/ui_core.c | 21 +++++++++++++++++++++ src/ui/ui_core.h | 7 +++++++ 7 files changed, 54 insertions(+), 7 deletions(-) diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index 054a5e0f..7172f861 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -4707,6 +4707,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) UI_WidthFill UI_Row UI_Focus(UI_FocusKind_Null) { + UI_Key menu_bar_group_key = ui_key_from_string(ui_key_zero(), str8_lit("###top_bar_group")); MemoryZeroArray(ui_top_parent()->parent->corner_radii); //- rjf: left column @@ -4729,7 +4730,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds) //- rjf: menu items ui_set_next_flags(UI_BoxFlag_DrawBackground); - UI_PrefWidth(ui_children_sum(1)) UI_Row UI_PrefWidth(ui_text_dim(20, 1)) + UI_PrefWidth(ui_children_sum(1)) UI_Row UI_PrefWidth(ui_text_dim(20, 1)) UI_GroupKey(menu_bar_group_key) { // rjf: file menu UI_Key file_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_file_menu_key_")); diff --git a/src/raddbg/raddbg.h b/src/raddbg/raddbg.h index 6fc2e550..307b61d3 100644 --- a/src/raddbg/raddbg.h +++ b/src/raddbg/raddbg.h @@ -105,7 +105,7 @@ // [ ] lock icon // [ ] "rotation arrow" icon next to executables // -// [ ] Using the word "symbol" in "Code (Symbol)" seems like a bad idea, since +// [x] Using the word "symbol" in "Code (Symbol)" seems like a bad idea, since // you're referring to non-identifier characters, but in a debugger // "symbol" usually means something defined in the debug information. // @@ -118,16 +118,16 @@ // color to white (or the inverse of the background color, or whatever) so // that the user can see what things on the screen use that theme color. // -// [ ] I couldn't figure out how to affect the "dim" color in constants that +// [x] I couldn't figure out how to affect the "dim" color in constants that // have alternating bright/dim letters to show sections of a number. Is // this in the theme colors somewhere? // -// [ ] ** Scrollbars are barely visible for me, for some reason. I could not +// [x] ** Scrollbars are barely visible for me, for some reason. I could not // find anything in the theme that would fill them with a solid, bright // color. Instead they are just a thin outline and the same color as the // scroll bar background. // -// [ ] Many of the UI elements, like the menus, would like better if they had +// [x] Many of the UI elements, like the menus, would like better if they had // a little bit of margin. Having the text right next to the edges, and // with no line spacing, makes it harder to read things quickly. // @@ -144,11 +144,11 @@ // [ ] It'd be nice to have a "goto byte" option for source views, for jumping // to error messages that are byte-based instead of line-based. // -// [ ] Pressing the left mouse button on the menu bar and dragging does not +// [x] Pressing the left mouse button on the menu bar and dragging does not // move through the menus as expected - instead, it opens the one you // clicked down on, then does nothing until you release, at which point it // opens the menu you released on. -// [ ] Similarly, pressing the left mouse button on a menu and dragging to an +// [x] Similarly, pressing the left mouse button on a menu and dragging to an // item, then releasing, does not trigger that item as expected. Instead, // it is a nop, and it waits for you to click again on the item. // diff --git a/src/ui/generated/ui.meta.c b/src/ui/generated/ui.meta.c index 6b8d711b..6f0d82e5 100644 --- a/src/ui/generated/ui.meta.c +++ b/src/ui/generated/ui.meta.c @@ -16,6 +16,7 @@ #define UI_FocusHot(v) DeferLoop(ui_push_focus_hot(v), ui_pop_focus_hot()) #define UI_FocusActive(v) DeferLoop(ui_push_focus_active(v), ui_pop_focus_active()) #define UI_FastpathCodepoint(v) DeferLoop(ui_push_fastpath_codepoint(v), ui_pop_fastpath_codepoint()) +#define UI_GroupKey(v) DeferLoop(ui_push_group_key(v), ui_pop_group_key()) #define UI_Transparency(v) DeferLoop(ui_push_transparency(v), ui_pop_transparency()) #define UI_Palette(v) DeferLoop(ui_push_palette(v), ui_pop_palette()) #define UI_Squish(v) DeferLoop(ui_push_squish(v), ui_pop_squish()) @@ -44,6 +45,7 @@ internal UI_BoxFlags ui_top_flags(void) { UI_StackTopImpl(ui_state, Flags, flags internal UI_FocusKind ui_top_focus_hot(void) { UI_StackTopImpl(ui_state, FocusHot, focus_hot) } internal UI_FocusKind ui_top_focus_active(void) { UI_StackTopImpl(ui_state, FocusActive, focus_active) } internal U32 ui_top_fastpath_codepoint(void) { UI_StackTopImpl(ui_state, FastpathCodepoint, fastpath_codepoint) } +internal UI_Key ui_top_group_key(void) { UI_StackTopImpl(ui_state, GroupKey, group_key) } internal F32 ui_top_transparency(void) { UI_StackTopImpl(ui_state, Transparency, transparency) } internal UI_Palette* ui_top_palette(void) { UI_StackTopImpl(ui_state, Palette, palette) } internal F32 ui_top_squish(void) { UI_StackTopImpl(ui_state, Squish, squish) } @@ -71,6 +73,7 @@ internal UI_BoxFlags ui_bottom_flags(void) { UI_StackBottomImpl(ui_state, Flags, internal UI_FocusKind ui_bottom_focus_hot(void) { UI_StackBottomImpl(ui_state, FocusHot, focus_hot) } internal UI_FocusKind ui_bottom_focus_active(void) { UI_StackBottomImpl(ui_state, FocusActive, focus_active) } internal U32 ui_bottom_fastpath_codepoint(void) { UI_StackBottomImpl(ui_state, FastpathCodepoint, fastpath_codepoint) } +internal UI_Key ui_bottom_group_key(void) { UI_StackBottomImpl(ui_state, GroupKey, group_key) } internal F32 ui_bottom_transparency(void) { UI_StackBottomImpl(ui_state, Transparency, transparency) } internal UI_Palette* ui_bottom_palette(void) { UI_StackBottomImpl(ui_state, Palette, palette) } internal F32 ui_bottom_squish(void) { UI_StackBottomImpl(ui_state, Squish, squish) } @@ -98,6 +101,7 @@ internal UI_BoxFlags ui_push_flags(UI_BoxFlags v) { UI_StackPushImpl(ui_state, F internal UI_FocusKind ui_push_focus_hot(UI_FocusKind v) { UI_StackPushImpl(ui_state, FocusHot, focus_hot, UI_FocusKind, v) } internal UI_FocusKind ui_push_focus_active(UI_FocusKind v) { UI_StackPushImpl(ui_state, FocusActive, focus_active, UI_FocusKind, v) } internal U32 ui_push_fastpath_codepoint(U32 v) { UI_StackPushImpl(ui_state, FastpathCodepoint, fastpath_codepoint, U32, v) } +internal UI_Key ui_push_group_key(UI_Key v) { UI_StackPushImpl(ui_state, GroupKey, group_key, UI_Key, v) } internal F32 ui_push_transparency(F32 v) { UI_StackPushImpl(ui_state, Transparency, transparency, F32, v) } internal UI_Palette* ui_push_palette(UI_Palette* v) { UI_StackPushImpl(ui_state, Palette, palette, UI_Palette* , v) } internal F32 ui_push_squish(F32 v) { UI_StackPushImpl(ui_state, Squish, squish, F32, v) } @@ -125,6 +129,7 @@ internal UI_BoxFlags ui_pop_flags(void) { UI_StackPopImpl(ui_state, Flags, flags internal UI_FocusKind ui_pop_focus_hot(void) { UI_StackPopImpl(ui_state, FocusHot, focus_hot) } internal UI_FocusKind ui_pop_focus_active(void) { UI_StackPopImpl(ui_state, FocusActive, focus_active) } internal U32 ui_pop_fastpath_codepoint(void) { UI_StackPopImpl(ui_state, FastpathCodepoint, fastpath_codepoint) } +internal UI_Key ui_pop_group_key(void) { UI_StackPopImpl(ui_state, GroupKey, group_key) } internal F32 ui_pop_transparency(void) { UI_StackPopImpl(ui_state, Transparency, transparency) } internal UI_Palette* ui_pop_palette(void) { UI_StackPopImpl(ui_state, Palette, palette) } internal F32 ui_pop_squish(void) { UI_StackPopImpl(ui_state, Squish, squish) } @@ -152,6 +157,7 @@ internal UI_BoxFlags ui_set_next_flags(UI_BoxFlags v) { UI_StackSetNextImpl(ui_s internal UI_FocusKind ui_set_next_focus_hot(UI_FocusKind v) { UI_StackSetNextImpl(ui_state, FocusHot, focus_hot, UI_FocusKind, v) } internal UI_FocusKind ui_set_next_focus_active(UI_FocusKind v) { UI_StackSetNextImpl(ui_state, FocusActive, focus_active, UI_FocusKind, v) } internal U32 ui_set_next_fastpath_codepoint(U32 v) { UI_StackSetNextImpl(ui_state, FastpathCodepoint, fastpath_codepoint, U32, v) } +internal UI_Key ui_set_next_group_key(UI_Key v) { UI_StackSetNextImpl(ui_state, GroupKey, group_key, UI_Key, v) } internal F32 ui_set_next_transparency(F32 v) { UI_StackSetNextImpl(ui_state, Transparency, transparency, F32, v) } internal UI_Palette* ui_set_next_palette(UI_Palette* v) { UI_StackSetNextImpl(ui_state, Palette, palette, UI_Palette* , v) } internal F32 ui_set_next_squish(F32 v) { UI_StackSetNextImpl(ui_state, Squish, squish, F32, v) } diff --git a/src/ui/generated/ui.meta.h b/src/ui/generated/ui.meta.h index 1b2c1683..9573288f 100644 --- a/src/ui/generated/ui.meta.h +++ b/src/ui/generated/ui.meta.h @@ -18,6 +18,7 @@ typedef struct UI_FlagsNode UI_FlagsNode; struct UI_FlagsNode{UI_FlagsNode *next typedef struct UI_FocusHotNode UI_FocusHotNode; struct UI_FocusHotNode{UI_FocusHotNode *next; UI_FocusKind v;}; typedef struct UI_FocusActiveNode UI_FocusActiveNode; struct UI_FocusActiveNode{UI_FocusActiveNode *next; UI_FocusKind v;}; typedef struct UI_FastpathCodepointNode UI_FastpathCodepointNode; struct UI_FastpathCodepointNode{UI_FastpathCodepointNode *next; U32 v;}; +typedef struct UI_GroupKeyNode UI_GroupKeyNode; struct UI_GroupKeyNode{UI_GroupKeyNode *next; UI_Key v;}; typedef struct UI_TransparencyNode UI_TransparencyNode; struct UI_TransparencyNode{UI_TransparencyNode *next; F32 v;}; typedef struct UI_PaletteNode UI_PaletteNode; struct UI_PaletteNode{UI_PaletteNode *next; UI_Palette* v;}; typedef struct UI_SquishNode UI_SquishNode; struct UI_SquishNode{UI_SquishNode *next; F32 v;}; @@ -48,6 +49,7 @@ UI_FlagsNode flags_nil_stack_top;\ UI_FocusHotNode focus_hot_nil_stack_top;\ UI_FocusActiveNode focus_active_nil_stack_top;\ UI_FastpathCodepointNode fastpath_codepoint_nil_stack_top;\ +UI_GroupKeyNode group_key_nil_stack_top;\ UI_TransparencyNode transparency_nil_stack_top;\ UI_PaletteNode palette_nil_stack_top;\ UI_SquishNode squish_nil_stack_top;\ @@ -77,6 +79,7 @@ state->flags_nil_stack_top.v = 0;\ state->focus_hot_nil_stack_top.v = UI_FocusKind_Null;\ state->focus_active_nil_stack_top.v = UI_FocusKind_Null;\ state->fastpath_codepoint_nil_stack_top.v = 0;\ +state->group_key_nil_stack_top.v = ui_key_zero();\ state->transparency_nil_stack_top.v = 0;\ state->palette_nil_stack_top.v = &ui_g_nil_palette;\ state->squish_nil_stack_top.v = 0;\ @@ -108,6 +111,7 @@ struct { UI_FlagsNode *top; UI_BoxFlags bottom_val; UI_FlagsNode *free; B32 auto struct { UI_FocusHotNode *top; UI_FocusKind bottom_val; UI_FocusHotNode *free; B32 auto_pop; } focus_hot_stack;\ struct { UI_FocusActiveNode *top; UI_FocusKind bottom_val; UI_FocusActiveNode *free; B32 auto_pop; } focus_active_stack;\ struct { UI_FastpathCodepointNode *top; U32 bottom_val; UI_FastpathCodepointNode *free; B32 auto_pop; } fastpath_codepoint_stack;\ +struct { UI_GroupKeyNode *top; UI_Key bottom_val; UI_GroupKeyNode *free; B32 auto_pop; } group_key_stack;\ struct { UI_TransparencyNode *top; F32 bottom_val; UI_TransparencyNode *free; B32 auto_pop; } transparency_stack;\ struct { UI_PaletteNode *top; UI_Palette* bottom_val; UI_PaletteNode *free; B32 auto_pop; } palette_stack;\ struct { UI_SquishNode *top; F32 bottom_val; UI_SquishNode *free; B32 auto_pop; } squish_stack;\ @@ -137,6 +141,7 @@ state->flags_stack.top = &state->flags_nil_stack_top; state->flags_stack.bottom_ state->focus_hot_stack.top = &state->focus_hot_nil_stack_top; state->focus_hot_stack.bottom_val = UI_FocusKind_Null; state->focus_hot_stack.free = 0; state->focus_hot_stack.auto_pop = 0;\ state->focus_active_stack.top = &state->focus_active_nil_stack_top; state->focus_active_stack.bottom_val = UI_FocusKind_Null; state->focus_active_stack.free = 0; state->focus_active_stack.auto_pop = 0;\ state->fastpath_codepoint_stack.top = &state->fastpath_codepoint_nil_stack_top; state->fastpath_codepoint_stack.bottom_val = 0; state->fastpath_codepoint_stack.free = 0; state->fastpath_codepoint_stack.auto_pop = 0;\ +state->group_key_stack.top = &state->group_key_nil_stack_top; state->group_key_stack.bottom_val = ui_key_zero(); state->group_key_stack.free = 0; state->group_key_stack.auto_pop = 0;\ state->transparency_stack.top = &state->transparency_nil_stack_top; state->transparency_stack.bottom_val = 0; state->transparency_stack.free = 0; state->transparency_stack.auto_pop = 0;\ state->palette_stack.top = &state->palette_nil_stack_top; state->palette_stack.bottom_val = &ui_g_nil_palette; state->palette_stack.free = 0; state->palette_stack.auto_pop = 0;\ state->squish_stack.top = &state->squish_nil_stack_top; state->squish_stack.bottom_val = 0; state->squish_stack.free = 0; state->squish_stack.auto_pop = 0;\ @@ -166,6 +171,7 @@ if(state->flags_stack.auto_pop) { ui_pop_flags(); state->flags_stack.auto_pop = if(state->focus_hot_stack.auto_pop) { ui_pop_focus_hot(); state->focus_hot_stack.auto_pop = 0; }\ if(state->focus_active_stack.auto_pop) { ui_pop_focus_active(); state->focus_active_stack.auto_pop = 0; }\ if(state->fastpath_codepoint_stack.auto_pop) { ui_pop_fastpath_codepoint(); state->fastpath_codepoint_stack.auto_pop = 0; }\ +if(state->group_key_stack.auto_pop) { ui_pop_group_key(); state->group_key_stack.auto_pop = 0; }\ if(state->transparency_stack.auto_pop) { ui_pop_transparency(); state->transparency_stack.auto_pop = 0; }\ if(state->palette_stack.auto_pop) { ui_pop_palette(); state->palette_stack.auto_pop = 0; }\ if(state->squish_stack.auto_pop) { ui_pop_squish(); state->squish_stack.auto_pop = 0; }\ @@ -194,6 +200,7 @@ internal UI_BoxFlags ui_top_flags(void); internal UI_FocusKind ui_top_focus_hot(void); internal UI_FocusKind ui_top_focus_active(void); internal U32 ui_top_fastpath_codepoint(void); +internal UI_Key ui_top_group_key(void); internal F32 ui_top_transparency(void); internal UI_Palette* ui_top_palette(void); internal F32 ui_top_squish(void); @@ -221,6 +228,7 @@ internal UI_BoxFlags ui_bottom_flags(void); internal UI_FocusKind ui_bottom_focus_hot(void); internal UI_FocusKind ui_bottom_focus_active(void); internal U32 ui_bottom_fastpath_codepoint(void); +internal UI_Key ui_bottom_group_key(void); internal F32 ui_bottom_transparency(void); internal UI_Palette* ui_bottom_palette(void); internal F32 ui_bottom_squish(void); @@ -248,6 +256,7 @@ internal UI_BoxFlags ui_push_flags(UI_BoxFlags v); internal UI_FocusKind ui_push_focus_hot(UI_FocusKind v); internal UI_FocusKind ui_push_focus_active(UI_FocusKind v); internal U32 ui_push_fastpath_codepoint(U32 v); +internal UI_Key ui_push_group_key(UI_Key v); internal F32 ui_push_transparency(F32 v); internal UI_Palette* ui_push_palette(UI_Palette* v); internal F32 ui_push_squish(F32 v); @@ -275,6 +284,7 @@ internal UI_BoxFlags ui_pop_flags(void); internal UI_FocusKind ui_pop_focus_hot(void); internal UI_FocusKind ui_pop_focus_active(void); internal U32 ui_pop_fastpath_codepoint(void); +internal UI_Key ui_pop_group_key(void); internal F32 ui_pop_transparency(void); internal UI_Palette* ui_pop_palette(void); internal F32 ui_pop_squish(void); @@ -302,6 +312,7 @@ internal UI_BoxFlags ui_set_next_flags(UI_BoxFlags v); internal UI_FocusKind ui_set_next_focus_hot(UI_FocusKind v); internal UI_FocusKind ui_set_next_focus_active(UI_FocusKind v); internal U32 ui_set_next_fastpath_codepoint(U32 v); +internal UI_Key ui_set_next_group_key(UI_Key v); internal F32 ui_set_next_transparency(F32 v); internal UI_Palette* ui_set_next_palette(UI_Palette* v); internal F32 ui_set_next_squish(F32 v); diff --git a/src/ui/ui.mdesk b/src/ui/ui.mdesk index 0f9cdcc0..1f1e3a6a 100644 --- a/src/ui/ui.mdesk +++ b/src/ui/ui.mdesk @@ -27,6 +27,7 @@ UI_StackTable: { FocusHot focus_hot UI_FocusKind UI_FocusKind_Null } { FocusActive focus_active UI_FocusKind UI_FocusKind_Null } { FastpathCodepoint fastpath_codepoint U32 0 } + { GroupKey group_key UI_Key `ui_key_zero()` } //- rjf: colors { Transparency transparency F32 0 } diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index 37f4ea13..697c09fe 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -2142,6 +2142,7 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key) box->key = key; box->flags = flags|ui_state->flags_stack.top->v; box->fastpath_codepoint = ui_state->fastpath_codepoint_stack.top->v; + box->group_key = ui_state->group_key_stack.top->v; if(ui_is_focus_active() && (box->flags & UI_BoxFlag_DefaultFocusNav) && ui_key_match(ui_state->default_nav_root_key, ui_key_zero())) { @@ -2771,6 +2772,26 @@ ui_signal_from_box(UI_Box *box) } } + ////////////////////////////// + //- rjf: mouse is over this box's rect, currently-active-key has the same group key? -> set hot/active key + // + if(box->flags & UI_BoxFlag_MouseClickable && + contains_2f32(rect, ui_state->mouse) && + !contains_2f32(blacklist_rect, ui_state->mouse) && + !ui_key_match(ui_key_zero(), box->group_key)) + { + for(EachEnumVal(UI_MouseButtonKind, k)) + { + UI_Box *active_box = ui_box_from_key(ui_state->active_box_key[k]); + if(ui_key_match(box->group_key, active_box->group_key)) + { + ui_state->hot_box_key = box->key; + ui_state->active_box_key[k] = box->key; + sig.f |= UI_SignalFlag_Hovering|(UI_SignalFlag_Dragging< set drop hot key // diff --git a/src/ui/ui_core.h b/src/ui/ui_core.h index a0031a5a..6048ebf7 100644 --- a/src/ui/ui_core.h +++ b/src/ui/ui_core.h @@ -375,6 +375,7 @@ struct UI_Box Axis2 child_layout_axis; OS_Cursor hover_cursor; U32 fastpath_codepoint; + UI_Key group_key; D_Bucket *draw_bucket; UI_BoxCustomDrawFunctionType *custom_draw; void *custom_draw_user_data; @@ -821,6 +822,7 @@ internal UI_BoxFlags ui_top_flags(void); internal UI_FocusKind ui_top_focus_hot(void); internal UI_FocusKind ui_top_focus_active(void); internal U32 ui_top_fastpath_codepoint(void); +internal UI_Key ui_top_group_key(void); internal F32 ui_top_transparency(void); internal UI_Palette* ui_top_palette(void); internal F32 ui_top_squish(void); @@ -848,6 +850,7 @@ internal UI_BoxFlags ui_bottom_flags(void); internal UI_FocusKind ui_bottom_focus_hot(void); internal UI_FocusKind ui_bottom_focus_active(void); internal U32 ui_bottom_fastpath_codepoint(void); +internal UI_Key ui_bottom_group_key(void); internal F32 ui_bottom_transparency(void); internal UI_Palette* ui_bottom_palette(void); internal F32 ui_bottom_squish(void); @@ -875,6 +878,7 @@ internal UI_BoxFlags ui_push_flags(UI_BoxFlags v); internal UI_FocusKind ui_push_focus_hot(UI_FocusKind v); internal UI_FocusKind ui_push_focus_active(UI_FocusKind v); internal U32 ui_push_fastpath_codepoint(U32 v); +internal UI_Key ui_push_group_key(UI_Key v); internal F32 ui_push_transparency(F32 v); internal UI_Palette* ui_push_palette(UI_Palette* v); internal F32 ui_push_squish(F32 v); @@ -902,6 +906,7 @@ internal UI_BoxFlags ui_pop_flags(void); internal UI_FocusKind ui_pop_focus_hot(void); internal UI_FocusKind ui_pop_focus_active(void); internal U32 ui_pop_fastpath_codepoint(void); +internal UI_Key ui_pop_group_key(void); internal F32 ui_pop_transparency(void); internal UI_Palette* ui_pop_palette(void); internal F32 ui_pop_squish(void); @@ -929,6 +934,7 @@ internal UI_BoxFlags ui_set_next_flags(UI_BoxFlags v); internal UI_FocusKind ui_set_next_focus_hot(UI_FocusKind v); internal UI_FocusKind ui_set_next_focus_active(UI_FocusKind v); internal U32 ui_set_next_fastpath_codepoint(U32 v); +internal UI_Key ui_set_next_group_key(UI_Key v); internal F32 ui_set_next_transparency(F32 v); internal UI_Palette* ui_set_next_palette(UI_Palette* v); internal F32 ui_set_next_squish(F32 v); @@ -970,6 +976,7 @@ internal void ui_pop_corner_radius(void); #define UI_FocusHot(v) DeferLoop(ui_push_focus_hot(v), ui_pop_focus_hot()) #define UI_FocusActive(v) DeferLoop(ui_push_focus_active(v), ui_pop_focus_active()) #define UI_FastpathCodepoint(v) DeferLoop(ui_push_fastpath_codepoint(v), ui_pop_fastpath_codepoint()) +#define UI_GroupKey(v) DeferLoop(ui_push_group_key(v), ui_pop_group_key()) #define UI_Transparency(v) DeferLoop(ui_push_transparency(v), ui_pop_transparency()) #define UI_Palette(v) DeferLoop(ui_push_palette(v), ui_pop_palette()) #define UI_Squish(v) DeferLoop(ui_push_squish(v), ui_pop_squish())