mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
begin some work on extending rich hovering; working towards correllating rich hover info from everywhere, to everywhere; memory view <-> source view <-> bitmap viewer <-> watch window <-> etc.
This commit is contained in:
+10
-5
@@ -12232,9 +12232,13 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
|||||||
//
|
//
|
||||||
UI_Parent(text_container_box) ProfScope("build line text") UI_Focus(UI_FocusKind_Off)
|
UI_Parent(text_container_box) ProfScope("build line text") UI_Focus(UI_FocusKind_Off)
|
||||||
{
|
{
|
||||||
DF_RichHoverInfo rich_hover_info = df_get_rich_hover_info();
|
DF_RichHoverInfo rich_hover = df_get_rich_hover_info();
|
||||||
DI_Key hovered_line_dbgi_key = rich_hover_info.dbgi_key;
|
Rng1U64 rich_hover_voff_range = rich_hover.voff_range;
|
||||||
U64 hovered_line_voff = rich_hover_info.voff_range.min;
|
if(rich_hover_voff_range.min == 0 && rich_hover_voff_range.max == 0)
|
||||||
|
{
|
||||||
|
DF_Entity *module = df_entity_from_handle(rich_hover.module);
|
||||||
|
rich_hover_voff_range = df_voff_range_from_vaddr_range(module, rich_hover.vaddr_range);
|
||||||
|
}
|
||||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||||
UI_WidthFill
|
UI_WidthFill
|
||||||
UI_Column
|
UI_Column
|
||||||
@@ -12508,8 +12512,9 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
|||||||
for(DF_LineNode *n = lines->first; n != 0; n = n->next)
|
for(DF_LineNode *n = lines->first; n != 0; n = n->next)
|
||||||
{
|
{
|
||||||
if((n->v.pt.line == line_num || df_entity_is_nil(df_entity_from_handle(df_interact_regs()->file))) &&
|
if((n->v.pt.line == line_num || df_entity_is_nil(df_entity_from_handle(df_interact_regs()->file))) &&
|
||||||
di_key_match(&n->v.dbgi_key, &hovered_line_dbgi_key) &&
|
((di_key_match(&n->v.dbgi_key, &rich_hover.dbgi_key) &&
|
||||||
n->v.voff_range.min <= hovered_line_voff && hovered_line_voff < n->v.voff_range.max)
|
n->v.voff_range.min <= rich_hover_voff_range.min && rich_hover_voff_range.min <= n->v.voff_range.max) ||
|
||||||
|
(params->line_vaddrs[line_idx] == rich_hover.vaddr_range.min && rich_hover.vaddr_range.min != 0)))
|
||||||
{
|
{
|
||||||
matches = 1;
|
matches = 1;
|
||||||
line_info_line_num = n->v.pt.line;
|
line_info_line_num = n->v.pt.line;
|
||||||
|
|||||||
@@ -1204,6 +1204,17 @@ DF_VIEW_UI_FUNCTION_DEF(bitmap)
|
|||||||
Vec4F32 hsva = hsva_from_rgba(color);
|
Vec4F32 hsva = hsva_from_rgba(color);
|
||||||
ui_do_color_tooltip_hsva(hsva);
|
ui_do_color_tooltip_hsva(hsva);
|
||||||
}
|
}
|
||||||
|
DF_RichHoverInfo info = {0};
|
||||||
|
{
|
||||||
|
Rng1U64 hover_vaddr_range = r1u64(vaddr_range.min+off_bytes, vaddr_range.min+off_bytes+r_tex2d_format_bytes_per_pixel_table[topology.fmt]);
|
||||||
|
DF_Entity *module = df_module_from_process_vaddr(process, info.vaddr_range.min);
|
||||||
|
info.process = df_handle_from_entity(process);
|
||||||
|
info.vaddr_range = hover_vaddr_range;
|
||||||
|
info.module = df_handle_from_entity(module);
|
||||||
|
info.voff_range = df_voff_range_from_vaddr_range(module, info.vaddr_range);
|
||||||
|
info.dbgi_key = df_dbgi_key_from_module(module);
|
||||||
|
}
|
||||||
|
df_set_rich_hover_info(&info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user