mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-23 20:24:59 -07:00
padding visualization
This commit is contained in:
@@ -771,6 +771,7 @@ enum
|
||||
DF_EvalVizRowFlag_CanExpand = (1<<0),
|
||||
DF_EvalVizRowFlag_CanEditValue = (1<<1),
|
||||
DF_EvalVizRowFlag_Canvas = (1<<2),
|
||||
DF_EvalVizRowFlag_ExprIsSpecial= (1<<3),
|
||||
};
|
||||
|
||||
typedef struct DF_EvalVizRow DF_EvalVizRow;
|
||||
|
||||
+9
-1
@@ -7218,6 +7218,10 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DBGI_Scope *scop
|
||||
row->value_ui_rule_spec = value_ui_rule_spec;
|
||||
row->expand_ui_rule_node = expand_ui_rule_node;
|
||||
row->expand_ui_rule_spec = expand_ui_rule_spec;
|
||||
if(block->member && block->member->kind == TG_MemberKind_Padding)
|
||||
{
|
||||
row->flags |= DF_EvalVizRowFlag_ExprIsSpecial;
|
||||
}
|
||||
if(expandability_required)
|
||||
{
|
||||
row->flags |= DF_EvalVizRowFlag_CanExpand;
|
||||
@@ -7263,7 +7267,11 @@ df_eval_viz_windowed_row_list_from_viz_block_list(Arena *arena, DBGI_Scope *scop
|
||||
String8List display_strings = df_single_line_eval_value_strings_from_eval(scratch.arena, DF_EvalVizStringFlag_ReadOnlyDisplayRules, parse_ctx->type_graph, parse_ctx->rdbg, ctrl_ctx, default_radix, font, font_size, 500, 0, member_eval, member, &view_rule_table);
|
||||
String8List edit_strings = df_single_line_eval_value_strings_from_eval(scratch.arena, 0, parse_ctx->type_graph, parse_ctx->rdbg, ctrl_ctx, default_radix, font, font_size, 500, 0, member_eval, member, &view_rule_table);
|
||||
DF_EvalVizRow *row = df_eval_viz_row_list_push_new(arena, parse_ctx, &list, block, key, member_eval);
|
||||
row->expr = push_str8_copy(arena, member->name);
|
||||
if(member->kind == TG_MemberKind_Padding)
|
||||
{
|
||||
row->flags |= DF_EvalVizRowFlag_ExprIsSpecial;
|
||||
}
|
||||
row->expr = push_str8_copy(arena, member->name);
|
||||
row->display_value = str8_list_join(arena, &display_strings, 0);
|
||||
row->edit_value = str8_list_join(arena, &edit_strings, 0);
|
||||
row->value_ui_rule_node = value_ui_rule_node;
|
||||
|
||||
@@ -1238,7 +1238,9 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
|
||||
{
|
||||
B32 expr_editing_active = ui_is_focus_active();
|
||||
B32 is_inherited = (row->inherited_type_key_chain.count != 0);
|
||||
UI_Font(code_font) UI_TextColor(row->depth > 0 ? df_rgba_from_theme_color(DF_ThemeColor_WeakText) : ui_top_text_color())
|
||||
UI_Font(code_font) UI_TextColor((row->flags & DF_EvalVizRowFlag_ExprIsSpecial) ?
|
||||
df_rgba_from_theme_color(DF_ThemeColor_Highlight0) :
|
||||
row->depth > 0 ? df_rgba_from_theme_color(DF_ThemeColor_WeakText) : ui_top_text_color())
|
||||
{
|
||||
if(is_inherited)
|
||||
{
|
||||
@@ -1251,7 +1253,7 @@ df_eval_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_EvalW
|
||||
{
|
||||
matches = fuzzy_match_find(scratch.arena, filter, row->expr);
|
||||
}
|
||||
sig = df_line_editf((DF_LineEditFlag_CodeContents|
|
||||
sig = df_line_editf((DF_LineEditFlag_CodeContents*(!(row->flags & DF_EvalVizRowFlag_ExprIsSpecial))|
|
||||
DF_LineEditFlag_NoBackground*(!is_inherited)|
|
||||
DF_LineEditFlag_DisableEdit*(!can_edit_expr)|
|
||||
DF_LineEditFlag_Expander*!!(row->flags & DF_EvalVizRowFlag_CanExpand)|
|
||||
|
||||
Reference in New Issue
Block a user