fix ctx menu closing escape consumption rules; fix top bar prioritization rules

This commit is contained in:
Ryan Fleury
2025-03-19 16:42:14 -07:00
parent b9ed7b3f0f
commit 8df16b8508
2 changed files with 443 additions and 442 deletions
+6 -6
View File
@@ -1172,6 +1172,12 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
ui_state->active_box_key[k] = ui_key_zero();
}
}
//- rjf: escape -> close context menu
if(ui_any_ctx_menu_is_open() && ui_slot_press(UI_EventActionSlot_Cancel))
{
ui_ctx_menu_close();
}
}
internal void
@@ -1179,12 +1185,6 @@ ui_end_build(void)
{
ProfBeginFunction();
//- rjf: escape -> close context menu
if(ui_state->ctx_menu_open != 0 && ui_slot_press(UI_EventActionSlot_Cancel))
{
ui_ctx_menu_close();
}
//- rjf: prune untouched or transient boxes in the cache
ProfScope("ui prune unused boxes")
{