ghosted 'view rule' hint

This commit is contained in:
Ryan Fleury
2025-02-15 15:10:04 -08:00
parent 5ce74bd66b
commit 176c2590a0
+14 -2
View File
@@ -2919,7 +2919,7 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
} }
// rjf: build cell line edit // rjf: build cell line edit
else RD_Font(cell_info.flags & RD_WatchCellFlag_IsNonCode ? RD_FontSlot_Main : RD_FontSlot_Code) else
{ {
RD_LineEditParams line_edit_params = {0}; RD_LineEditParams line_edit_params = {0};
{ {
@@ -2942,7 +2942,19 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
line_edit_params.fstrs = cell_info.fstrs; line_edit_params.fstrs = cell_info.fstrs;
} }
UI_TextAlignment(cell->px != 0 ? UI_TextAlign_Center : UI_TextAlign_Left) UI_TextAlignment(cell->px != 0 ? UI_TextAlign_Center : UI_TextAlign_Left)
sig = rd_line_editf(&line_edit_params, "%S###%I64x_row_%I64x", str8_zero(), cell_x, row_hash); {
B32 is_non_code = !!(cell_info.flags & RD_WatchCellFlag_IsNonCode);
String8 ghost_text = {0};
if(cell->kind == RD_WatchCellKind_Tag && cell_info.string.size == 0 && global_row_idx == 0)
{
ghost_text = str8_lit("View Rules");
is_non_code = !ui_is_focus_active();
}
RD_Font(is_non_code ? RD_FontSlot_Main : RD_FontSlot_Code)
{
sig = rd_line_editf(&line_edit_params, "%S###%I64x_row_%I64x", ghost_text, cell_x, row_hash);
}
}
#if 0 // TODO(rjf): @cfg #if 0 // TODO(rjf): @cfg
if(ui_is_focus_active() && if(ui_is_focus_active() &&
selection_tbl.min.x == selection_tbl.max.x && selection_tbl.min.y == selection_tbl.max.y && selection_tbl.min.x == selection_tbl.max.x && selection_tbl.min.y == selection_tbl.max.y &&