mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-22 15:37:49 +00:00
first pass at asynchronous file streaming -> hash store layer; fix non-windowed memory access in watch window when doing change visualization, causing major performance regression with large arrays; fix some extra jank with truncated-string-hover & help labels
This commit is contained in:
+9
-9
@@ -10543,22 +10543,22 @@ internal B32
|
||||
df_help_label(String8 string)
|
||||
{
|
||||
B32 result = 0;
|
||||
UI_Box *box = ui_build_box_from_stringf(0, "###%S_help_label", string);
|
||||
UI_Key help_hoverer_key = ui_key_from_stringf(box->key, "###help_hoverer");
|
||||
B32 box_is_hot = ((ui_key_match(ui_active_key(Side_Min), ui_key_zero()) || ui_key_match(ui_active_key(Side_Min), help_hoverer_key)) &&
|
||||
(ui_key_match(ui_active_key(Side_Max), ui_key_zero()) || ui_key_match(ui_active_key(Side_Min), help_hoverer_key)) &&
|
||||
contains_2f32(box->rect, ui_mouse()));
|
||||
UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "###%S_help_label", string);
|
||||
UI_Signal sig = ui_signal_from_box(box);
|
||||
UI_Parent(box)
|
||||
{
|
||||
UI_PrefWidth(ui_pct(1, 0)) ui_label(string);
|
||||
if(box_is_hot) UI_PrefWidth(ui_em(2.25f, 1))
|
||||
if(sig.hovering) UI_PrefWidth(ui_em(2.25f, 1))
|
||||
{
|
||||
result = 1;
|
||||
ui_set_next_font(ui_icon_font());
|
||||
ui_set_next_text_alignment(UI_TextAlign_Center);
|
||||
UI_Box *help_hoverer = ui_build_box_from_key(UI_BoxFlag_DrawText|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawHotEffects|UI_BoxFlag_Clickable, help_hoverer_key);
|
||||
UI_Box *help_hoverer = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawHotEffects, "###help_hoverer_%S", string);
|
||||
ui_box_equip_display_string(help_hoverer, df_g_icon_kind_text_table[DF_IconKind_QuestionMark]);
|
||||
UI_Signal sig = ui_signal_from_box(help_hoverer);
|
||||
result = sig.hovering;
|
||||
if(!contains_2f32(help_hoverer->rect, ui_mouse()))
|
||||
{
|
||||
result = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
+2
-13
@@ -984,6 +984,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
|
||||
case EVAL_EvalMode_Addr:
|
||||
{
|
||||
U64 size = tg_byte_size_from_graph_raddbg_key(parse_ctx.type_graph, parse_ctx.rdbg, row->eval.type_key);
|
||||
size = Min(size, 64);
|
||||
Rng1U64 vaddr_rng = r1u64(row->eval.offset, row->eval.offset+size);
|
||||
CTRL_ProcessMemorySlice slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, vaddr_rng);
|
||||
for(U64 idx = 0; idx < (size+63)/64; idx += 1)
|
||||
@@ -1243,19 +1244,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
|
||||
}
|
||||
StringJoin join = {str8_lit(""), str8_lit(" "), str8_lit("")};
|
||||
String8 error_string = str8_list_join(scratch.arena, &strings, &join);
|
||||
sig = df_error_label(error_string);
|
||||
if(sig.hovering)
|
||||
{
|
||||
UI_Tooltip
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Main))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Main))
|
||||
{
|
||||
for(EVAL_Error *error = row->errors.first; error != 0; error = error->next)
|
||||
{
|
||||
ui_label(error->text);
|
||||
}
|
||||
}
|
||||
}
|
||||
df_error_label(error_string);
|
||||
}
|
||||
|
||||
// rjf: hook -> call hook
|
||||
|
||||
Reference in New Issue
Block a user