mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-24 16:37:51 +00:00
tooltip coverage for all command evaluations, major top-bar simplification, anchored tooltips
This commit is contained in:
@@ -805,6 +805,7 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, U
|
||||
ui_state->ctx_menu_changed = 0;
|
||||
ui_state->default_animation_rate = 1 - pow_f32(2, (-60.f * ui_state->animation_dt));
|
||||
ui_state->tooltip_can_overflow_window = 0;
|
||||
ui_state->tooltip_anchor_key = ui_key_zero();
|
||||
ui_state->tags_key_stack_top = ui_state->tags_key_stack_free = 0;
|
||||
ui_state->tags_cache_slots_count = 512;
|
||||
ui_state->tags_cache_slots = push_array(ui_build_arena(), UI_TagsCacheSlot, ui_state->tags_cache_slots_count);
|
||||
@@ -1248,6 +1249,22 @@ ui_end_build(void)
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: anchor tooltips
|
||||
if(!ui_key_match(ui_state->tooltip_anchor_key, ui_key_zero()))
|
||||
{
|
||||
UI_Box *anchor_box = ui_box_from_key(ui_state->tooltip_anchor_key);
|
||||
if(!ui_box_is_nil(anchor_box))
|
||||
{
|
||||
ui_state->tooltip_root->rect.x0 = anchor_box->rect.x0;
|
||||
ui_state->tooltip_root->rect.y0 = anchor_box->rect.y1 + anchor_box->font_size*0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_state->tooltip_root->rect.x0 = 10000;
|
||||
ui_state->tooltip_root->rect.y0 = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: ensure special floating roots are within screen bounds
|
||||
UI_Box *floating_roots[] = {ui_state->tooltip_root, ui_state->ctx_menu_root};
|
||||
B32 force_contain[] =
|
||||
|
||||
Reference in New Issue
Block a user