mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
checkpoint on ui/palettes/visuals pass
This commit is contained in:
+190
-135
@@ -1026,7 +1026,6 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src)
|
||||
window->r = r_window_equip(window->os);
|
||||
window->ui = ui_state_alloc();
|
||||
window->view_state_hist = df_state_delta_history_alloc();
|
||||
window->drop_completion_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_drop_complete_ctx_menu_"));
|
||||
window->entity_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_entity_ctx_menu_"));
|
||||
window->tab_ctx_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_tab_ctx_menu_"));
|
||||
window->hover_eval_arena = arena_alloc();
|
||||
@@ -1064,17 +1063,17 @@ df_window_open(Vec2F32 size, OS_Handle preferred_monitor, DF_CfgSrc cfg_src)
|
||||
f_push_run_from_string(scratch.arena,
|
||||
df_font_from_slot(icon_font_slot),
|
||||
df_font_size_from_slot(window, icon_font_slot),
|
||||
0, 0, 0,
|
||||
0, 0, F_RunFlag_Smooth,
|
||||
df_g_icon_kind_text_table[icon_kind]);
|
||||
f_push_run_from_string(scratch.arena,
|
||||
df_font_from_slot(icon_font_slot),
|
||||
df_font_size_from_slot(window, DF_FontSlot_Main),
|
||||
0, 0, 0,
|
||||
0, 0, F_RunFlag_Smooth,
|
||||
df_g_icon_kind_text_table[icon_kind]);
|
||||
f_push_run_from_string(scratch.arena,
|
||||
df_font_from_slot(icon_font_slot),
|
||||
df_font_size_from_slot(window, DF_FontSlot_Code),
|
||||
0, 0, 0,
|
||||
0, 0, F_RunFlag_Smooth,
|
||||
df_g_icon_kind_text_table[icon_kind]);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
@@ -3456,7 +3455,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
ui_push_font(main_font);
|
||||
ui_push_font_size(main_font_size);
|
||||
ui_push_pref_width(ui_em(20.f, 1));
|
||||
ui_push_pref_height(ui_em(2.5f, 1.f));
|
||||
ui_push_pref_height(ui_em(2.75f, 1.f));
|
||||
ui_push_palette(df_palette_from_code(DF_PaletteCode_Default));
|
||||
ui_push_blur_size(10.f);
|
||||
}
|
||||
@@ -3522,6 +3521,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_IconKind icon_kind = df_icon_kind_from_view(view);
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(2.5f, 1.f))
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
@@ -3551,6 +3551,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_IconKind icon_kind = df_g_entity_kind_icon_kind_table[entity->kind];
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
ui_label(display_name);
|
||||
@@ -3560,59 +3561,6 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: entity drop completion ctx menu
|
||||
//
|
||||
{
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(ws->drop_completion_ctx_menu_key)
|
||||
UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
{
|
||||
DF_Entity *entity = df_entity_from_handle(ws->drop_completion_entity);
|
||||
DF_Panel *panel = df_panel_from_handle(ws->drop_completion_panel);
|
||||
if(df_entity_is_nil(entity))
|
||||
{
|
||||
ui_ctx_menu_close();
|
||||
}
|
||||
switch(entity->kind)
|
||||
{
|
||||
default:{}break;
|
||||
|
||||
case DF_EntityKind_Module:
|
||||
{
|
||||
}break;
|
||||
case DF_EntityKind_Process:
|
||||
{
|
||||
#if 0
|
||||
if(ui_clicked(df_icon_buttonf(DF_IconKind_FileOutline, 0, "Open Process Log")))
|
||||
{
|
||||
DF_Entity *log = df_log_from_entity(entity);
|
||||
DF_CmdParams params = df_cmd_params_from_panel(ws, panel);
|
||||
params.entity = df_handle_from_entity(log);
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Code));
|
||||
ui_ctx_menu_close();
|
||||
}
|
||||
#endif
|
||||
}break;
|
||||
case DF_EntityKind_Thread:
|
||||
{
|
||||
#if 0
|
||||
if(ui_clicked(df_icon_buttonf(DF_IconKind_FileOutline, 0, "Open Thread Log")))
|
||||
{
|
||||
DF_Entity *log = df_log_from_entity(entity);
|
||||
DF_CmdParams params = df_cmd_params_from_panel(ws, panel);
|
||||
params.entity = df_handle_from_entity(log);
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Code));
|
||||
ui_ctx_menu_close();
|
||||
}
|
||||
#endif
|
||||
}break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////
|
||||
//- rjf: developer menu
|
||||
//
|
||||
@@ -3730,7 +3678,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
|
||||
//- rjf: entity menu
|
||||
UI_CtxMenu(ws->entity_ctx_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
UI_CtxMenu(ws->entity_ctx_menu_key)
|
||||
UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_Entity *entity = df_entity_from_handle(ws->entity_ctx_menu_entity);
|
||||
DF_IconKind entity_icon = df_g_entity_kind_icon_kind_table[entity->kind];
|
||||
@@ -3741,9 +3691,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
// rjf: title
|
||||
UI_Row
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_PrefWidth(ui_em(2.f*1.5f, 1.f))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
UI_PrefHeight(ui_pct(1, 0))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Flags(UI_BoxFlag_DrawTextWeak)
|
||||
@@ -3764,6 +3716,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
}
|
||||
|
||||
DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f));
|
||||
|
||||
// rjf: name editor
|
||||
if(op_flags & DF_EntityOpFlag_Rename)
|
||||
{
|
||||
@@ -4177,6 +4131,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}break;
|
||||
}
|
||||
|
||||
DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f));
|
||||
|
||||
// rjf: color editor
|
||||
{
|
||||
B32 entity_has_color = entity->flags & DF_EntityFlag_HasColor;
|
||||
@@ -4235,7 +4191,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
}
|
||||
|
||||
UI_Row UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_em(12.f, 1.f)) UI_CornerRadius(8.f)
|
||||
UI_Row UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_em(16.f, 1.f)) UI_CornerRadius(8.f) UI_TextAlignment(UI_TextAlign_Center)
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
{
|
||||
if(ui_clicked(df_icon_buttonf(DF_IconKind_Trash, 0, "Remove Color###color_toggle")))
|
||||
{
|
||||
@@ -4264,6 +4221,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
//- rjf: tab menu
|
||||
UI_CtxMenu(ws->tab_ctx_menu_key) UI_PrefWidth(ui_em(25.f, 1.f)) UI_CornerRadius(0)
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_View *view = df_view_from_handle(ws->tab_ctx_menu_view);
|
||||
DF_IconKind view_icon = df_icon_kind_from_view(view);
|
||||
@@ -4274,9 +4232,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
// rjf: title
|
||||
UI_Row
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_PrefWidth(ui_em(3.f, 1.f))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
UI_PrefHeight(ui_pct(1, 0))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
@@ -4284,6 +4244,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_PrefWidth(ui_text_dim(10, 1)) ui_label(display_name);
|
||||
}
|
||||
|
||||
DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f));
|
||||
|
||||
// rjf: copy name
|
||||
if(ui_clicked(df_icon_buttonf(DF_IconKind_Clipboard, 0, "Copy Name")))
|
||||
{
|
||||
@@ -4735,7 +4697,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
// rjf: file menu
|
||||
UI_Key file_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_file_menu_key_"));
|
||||
UI_CtxMenu(file_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(file_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_CoreCmdKind cmds[] =
|
||||
{
|
||||
@@ -4759,7 +4724,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: window menu
|
||||
UI_Key window_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_window_menu_key_"));
|
||||
UI_CtxMenu(window_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(window_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_CoreCmdKind cmds[] =
|
||||
{
|
||||
@@ -4779,7 +4747,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: panel menu
|
||||
UI_Key panel_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_panel_menu_key_"));
|
||||
UI_CtxMenu(panel_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(panel_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_CoreCmdKind cmds[] =
|
||||
{
|
||||
@@ -4819,7 +4790,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: view menu
|
||||
UI_Key view_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_view_menu_key_"));
|
||||
UI_CtxMenu(view_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(view_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_CoreCmdKind cmds[] =
|
||||
{
|
||||
@@ -4873,7 +4847,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: targets menu
|
||||
UI_Key targets_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_targets_menu_key_"));
|
||||
UI_CtxMenu(targets_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(targets_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
DF_CoreCmdKind cmds[] =
|
||||
@@ -4890,6 +4867,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
};
|
||||
Assert(ArrayCount(codepoints) == ArrayCount(cmds));
|
||||
df_cmd_list_menu_buttons(ws, ArrayCount(cmds), cmds, codepoints);
|
||||
DF_Palette(DF_PaletteCode_Floating) ui_divider(ui_em(1.f, 1.f));
|
||||
DF_EntityList targets_list = df_query_cached_entity_list_with_kind(DF_EntityKind_Target);
|
||||
for(DF_EntityNode *n = targets_list.first; n != 0; n = n->next)
|
||||
{
|
||||
@@ -4917,7 +4895,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: ctrl menu
|
||||
UI_Key ctrl_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_ctrl_menu_key_"));
|
||||
UI_CtxMenu(ctrl_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(ctrl_menu_key)
|
||||
UI_PrefWidth(ui_em(40.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
DF_CoreCmdKind cmds[] =
|
||||
{
|
||||
@@ -4949,7 +4930,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
// rjf: help menu
|
||||
UI_Key help_menu_key = ui_key_from_string(ui_key_zero(), str8_lit("_help_menu_key_"));
|
||||
UI_CtxMenu(help_menu_key) UI_PrefWidth(ui_em(60.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(help_menu_key)
|
||||
UI_PrefWidth(ui_em(60.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
{
|
||||
UI_Row UI_TextAlignment(UI_TextAlign_Center) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
ui_label(str8_lit(BUILD_TITLE_STRING_LITERAL));
|
||||
@@ -5127,6 +5111,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_PrefWidth(ui_em(2.25f, 1))
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(ui_top_font_size()*0.85f)
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
{
|
||||
Temp scratch = scratch_begin(&arena, 1);
|
||||
DF_EntityList targets = df_push_active_target_list(scratch.arena);
|
||||
@@ -5142,7 +5127,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
if(can_play || !have_targets || processes.count == 0)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Flags((can_play ? 0 : UI_BoxFlag_Disabled))
|
||||
DF_Palette(DF_PaletteCode_SpecialPositive)
|
||||
DF_Palette(DF_PaletteCode_DefaultPositive)
|
||||
{
|
||||
UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Play]);
|
||||
os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect);
|
||||
@@ -5183,7 +5168,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
//- rjf: restart button
|
||||
if(!can_play && processes.count != 0) UI_TextAlignment(UI_TextAlign_Center)
|
||||
DF_Palette(DF_PaletteCode_SpecialPositive)
|
||||
DF_Palette(DF_PaletteCode_DefaultPositive)
|
||||
{
|
||||
UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Redo]);
|
||||
os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect);
|
||||
@@ -5218,7 +5203,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
//- rjf: pause button
|
||||
UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_pause ? 0 : UI_BoxFlag_Disabled)
|
||||
DF_Palette(DF_PaletteCode_SpecialNeutral)
|
||||
DF_Palette(DF_PaletteCode_DefaultNeutral)
|
||||
{
|
||||
UI_Signal sig = ui_button(df_g_icon_kind_text_table[DF_IconKind_Pause]);
|
||||
os_window_push_custom_title_bar_client_area(ws->os, sig.box->rect);
|
||||
@@ -5245,7 +5230,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
|
||||
//- rjf: stop button
|
||||
UI_TextAlignment(UI_TextAlign_Center) UI_Flags(can_stop ? 0 : UI_BoxFlag_Disabled)
|
||||
DF_Palette(DF_PaletteCode_SpecialNegative)
|
||||
DF_Palette(DF_PaletteCode_DefaultNegative)
|
||||
{
|
||||
UI_Signal sig = {0};
|
||||
{
|
||||
@@ -5399,7 +5384,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
String8 user_path = df_cfg_path_from_src(DF_CfgSrc_User);
|
||||
user_path = str8_chop_last_dot(user_path);
|
||||
UI_Font(ui_icon_font()) ui_label(df_g_icon_kind_text_table[DF_IconKind_Person]);
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_Person]);
|
||||
ui_label(str8_skip_last_slash(user_path));
|
||||
}
|
||||
UI_Signal user_sig = ui_signal_from_box(user_box);
|
||||
@@ -5434,7 +5421,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
String8 prof_path = df_cfg_path_from_src(DF_CfgSrc_Project);
|
||||
prof_path = str8_chop_last_dot(prof_path);
|
||||
UI_Font(ui_icon_font()) ui_label(df_g_icon_kind_text_table[DF_IconKind_Briefcase]);
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons)) UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_Briefcase]);
|
||||
ui_label(str8_skip_last_slash(prof_path));
|
||||
}
|
||||
UI_Signal prof_sig = ui_signal_from_box(prof_box);
|
||||
@@ -5570,6 +5558,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_PrefWidth(ui_em(2.25f, 1.f))
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[icon]);
|
||||
}
|
||||
UI_PrefWidth(ui_text_dim(10, 1)) ui_label(explanation);
|
||||
@@ -5606,6 +5595,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
ui_label(error_string);
|
||||
}
|
||||
@@ -5709,6 +5699,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
//
|
||||
if(!df_view_is_nil(ws->query_view_stack_top))
|
||||
UI_Focus((window_is_focused && !ui_any_ctx_menu_is_open() && !ws->menu_bar_focused && ws->query_view_selected) ? UI_FocusKind_On : UI_FocusKind_Off)
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
{
|
||||
DF_View *view = ws->query_view_stack_top;
|
||||
DF_CmdSpec *cmd_spec = ws->query_cmd_spec;
|
||||
@@ -5768,7 +5759,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
DF_IconKind icon_kind = ws->query_cmd_spec->info.canonical_icon_kind;
|
||||
if(icon_kind != DF_IconKind_Null)
|
||||
{
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons)) ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons)) UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
}
|
||||
ui_labelf("%S", ws->query_cmd_spec->info.display_name);
|
||||
ui_spacer(ui_em(0.5f, 1.f));
|
||||
@@ -5928,7 +5920,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_Focus((hover_eval_is_open && !ui_any_ctx_menu_is_open() && (!query_is_open || !ws->query_view_selected)) ? UI_FocusKind_Null : UI_FocusKind_Off)
|
||||
{
|
||||
//- rjf: eval -> viz artifacts
|
||||
F32 row_height = ui_top_font_size()*2.25f;
|
||||
F32 row_height = floor_f32(ui_top_font_size()*2.5f);
|
||||
DF_CfgTable cfg_table = {0};
|
||||
U64 expr_hash = df_hash_from_string(expr);
|
||||
DF_EvalViewKey eval_view_key = df_eval_view_key_from_stringf("eval_hover_%I64x", expr_hash);
|
||||
@@ -6057,7 +6049,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
UI_PrefWidth(ui_em(1.5f, 1))
|
||||
UI_Flags(UI_BoxFlag_DrawSideLeft*(row->depth>0) | UI_BoxFlag_DrawTextWeak)
|
||||
UI_Font(ui_icon_font())
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_Dot]);
|
||||
}
|
||||
UI_WidthFill
|
||||
@@ -6761,6 +6754,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_Find]);
|
||||
UI_PrefWidth(ui_text_dim(10, 1))
|
||||
{
|
||||
@@ -6792,6 +6786,18 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
//- rjf: panel not selected? -> darken
|
||||
//
|
||||
if(panel != ws->focused_panel)
|
||||
{
|
||||
UI_Palette(ui_build_palette(ui_top_palette(), .background = df_rgba_from_theme_color(DF_ThemeColor_InactivePanelOverlay)))
|
||||
UI_Rect(content_rect)
|
||||
{
|
||||
ui_build_box_from_key(UI_BoxFlag_DrawBackground, ui_key_zero());
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////
|
||||
//- rjf: build panel container box
|
||||
//
|
||||
@@ -7090,13 +7096,15 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
UI_WidthFill UI_Row
|
||||
{
|
||||
ui_spacer(ui_em(0.5f, 1.f));
|
||||
if(icon_kind != DF_IconKind_Null)
|
||||
{
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_PrefWidth(ui_em(2.25f, 1.f))
|
||||
UI_PrefWidth(ui_em(1.75f, 1.f))
|
||||
ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
}
|
||||
if(view->query_string_size != 0)
|
||||
@@ -7136,7 +7144,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
d_fancy_string_list_push(scratch.arena, &fstrs, &query);
|
||||
}
|
||||
UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero());
|
||||
ui_box_equip_display_fancy_strings(box, ui_top_tab_size(), &fstrs);
|
||||
ui_box_equip_display_fancy_strings(box, &fstrs);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
}
|
||||
@@ -7148,6 +7156,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_PrefWidth(ui_em(2.35f, 1.f)) UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons)*0.75f)
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_CornerRadius00(0)
|
||||
UI_CornerRadius01(0)
|
||||
{
|
||||
@@ -7220,6 +7229,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
UI_CornerRadius(tab_bar_vheight/2.f)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(ui_top_font_size()*0.75f)
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_HoverCursor(OS_Cursor_HandPoint)
|
||||
{
|
||||
@@ -7391,9 +7401,6 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_TextPoint);
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_Entity);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_SpawnEntityView));
|
||||
ui_ctx_menu_open(ws->drop_completion_ctx_menu_key, ui_key_zero(), sub_2f32(ui_mouse(), v2f32(2, 2)));
|
||||
ws->drop_completion_entity = df_handle_from_entity(entity);
|
||||
ws->drop_completion_panel = df_handle_from_panel(panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7667,14 +7674,19 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
// rjf: brighten
|
||||
{
|
||||
R_Rect2DInst *inst = d_rect(box->rect, v4f32(0, 0, 0, 0), 0, 0, 1.f);
|
||||
inst->colors[Corner_00] = v4f32(1.f, 0.9f, 0.7f, 0.1f*t);
|
||||
inst->colors[Corner_01] = v4f32(1.f, 0.9f, 0.7f, 0.1f*t);
|
||||
inst->colors[Corner_10] = v4f32(1.f, 0.9f, 0.7f, 0.1f*t);
|
||||
inst->colors[Corner_11] = v4f32(1.f, 0.9f, 0.7f, 0.1f*t);
|
||||
Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Highlight1);
|
||||
color.w *= t*0.2f;
|
||||
inst->colors[Corner_00] = color;
|
||||
inst->colors[Corner_01] = color;
|
||||
inst->colors[Corner_10] = color;
|
||||
inst->colors[Corner_11] = color;
|
||||
inst->colors[Corner_10].w *= t;
|
||||
inst->colors[Corner_11].w *= t;
|
||||
MemoryCopyArray(inst->corner_radii, box->corner_radii);
|
||||
}
|
||||
|
||||
// rjf: slight emboss fadeoff
|
||||
if(0)
|
||||
{
|
||||
Rng2F32 rect = r2f32p(box->rect.x0,
|
||||
box->rect.y0,
|
||||
@@ -7692,6 +7704,11 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
// rjf: active effect extension
|
||||
if(box->flags & UI_BoxFlag_DrawActiveEffects)
|
||||
{
|
||||
Vec4F32 shadow_color = df_rgba_from_theme_color(DF_ThemeColor_Highlight1);
|
||||
shadow_color.x *= 0.3f;
|
||||
shadow_color.y *= 0.3f;
|
||||
shadow_color.z *= 0.3f;
|
||||
shadow_color.w *= 0.5f*box->active_t;
|
||||
Vec2F32 shadow_size =
|
||||
{
|
||||
(box->rect.x1 - box->rect.x0)*0.60f*box->active_t,
|
||||
@@ -7703,7 +7720,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
// rjf: top -> bottom dark effect
|
||||
{
|
||||
R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0, box->rect.y0, box->rect.x1, box->rect.y0 + shadow_size.y), v4f32(0, 0, 0, 0), 0, 0, 1.f);
|
||||
inst->colors[Corner_00] = inst->colors[Corner_10] = v4f32(0.f, 0.f, 0.f, 0.8f*box->active_t);
|
||||
inst->colors[Corner_00] = inst->colors[Corner_10] = shadow_color;
|
||||
inst->colors[Corner_01] = inst->colors[Corner_11] = v4f32(0.f, 0.f, 0.f, 0.0f);
|
||||
MemoryCopyArray(inst->corner_radii, box->corner_radii);
|
||||
}
|
||||
@@ -7720,8 +7737,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x0, box->rect.y0, box->rect.x0 + shadow_size.x, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f);
|
||||
inst->colors[Corner_10] = inst->colors[Corner_11] = v4f32(0.f, 0.f, 0.f, 0.f);
|
||||
inst->colors[Corner_00] = v4f32(0.f, 0.f, 0.f, 0.8f*box->active_t);
|
||||
inst->colors[Corner_01] = v4f32(0.f, 0.f, 0.f, 0.4f*box->active_t);
|
||||
inst->colors[Corner_00] = shadow_color;
|
||||
inst->colors[Corner_01] = shadow_color;
|
||||
MemoryCopyArray(inst->corner_radii, box->corner_radii);
|
||||
}
|
||||
|
||||
@@ -7729,8 +7746,8 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
R_Rect2DInst *inst = d_rect(r2f32p(box->rect.x1 - shadow_size.x, box->rect.y0, box->rect.x1, box->rect.y1), v4f32(0, 0, 0, 0), 0, 0, 1.f);
|
||||
inst->colors[Corner_00] = inst->colors[Corner_01] = v4f32(0.f, 0.f, 0.f, 0.f);
|
||||
inst->colors[Corner_10] = v4f32(0.f, 0.f, 0.f, 0.8f*box->active_t);
|
||||
inst->colors[Corner_11] = v4f32(0.f, 0.f, 0.f, 0.4f*box->active_t);
|
||||
inst->colors[Corner_10] = shadow_color;
|
||||
inst->colors[Corner_11] = shadow_color;
|
||||
MemoryCopyArray(inst->corner_radii, box->corner_radii);
|
||||
}
|
||||
}
|
||||
@@ -7852,7 +7869,9 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
// rjf: hover effect
|
||||
if(b->flags & UI_BoxFlag_DrawHotEffects)
|
||||
{
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1.f), v4f32(1, 1, 1, 0.5f*b->hot_t), 0, 1.f, 1.f);
|
||||
Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_Highlight1);
|
||||
color.w *= 0.5f*b->hot_t;
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1.f), color, 0, 1.f, 1.f);
|
||||
MemoryCopyArray(inst->corner_radii, b->corner_radii);
|
||||
}
|
||||
}
|
||||
@@ -7902,11 +7921,10 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
}
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(r2f32p(b->rect.x0,
|
||||
b->rect.y0,
|
||||
b->rect.x0 + (b->rect.x1 - b->rect.x0) * b->focus_hot_t,
|
||||
b->rect.x0 + (b->rect.x1 - b->rect.x0) * 1.f,
|
||||
b->rect.y1),
|
||||
6.f),
|
||||
color, 4.f, 0, 4.f);
|
||||
inst->colors[Corner_00] = inst->colors[Corner_10] = v4f32(color.x, color.y, color.z, color.w/3.f);
|
||||
1.f),
|
||||
color, 4.f, 0, 1.f);
|
||||
MemoryCopyArray(inst->corner_radii, b->corner_radii);
|
||||
}
|
||||
|
||||
@@ -7915,8 +7933,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_FocusActive);
|
||||
color.w *= b->focus_active_t;
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1.f), color, 0, 2.f, 1.f);
|
||||
inst->colors[Corner_10] = inst->colors[Corner_01] = inst->colors[Corner_11] = v4f32(color.x, color.y, color.z, color.w/3.f);
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1.f), color, 0, 1.f, 1.f);
|
||||
MemoryCopyArray(inst->corner_radii, b->corner_radii);
|
||||
}
|
||||
|
||||
@@ -7925,8 +7942,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
{
|
||||
Vec4F32 color = df_rgba_from_theme_color(DF_ThemeColor_FocusInactive);
|
||||
color.w *= b->focus_active_disabled_t;
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1.f), color, 0, 2.f, 1.f);
|
||||
inst->colors[Corner_10] = inst->colors[Corner_01] = inst->colors[Corner_11] = v4f32(color.x, color.y, color.z, color.w/3.f);
|
||||
R_Rect2DInst *inst = d_rect(pad_2f32(b->rect, 1.f), color, 0, 1.f, 1.f);
|
||||
MemoryCopyArray(inst->corner_radii, b->corner_radii);
|
||||
}
|
||||
|
||||
@@ -7999,7 +8015,7 @@ df_window_update_and_render(Arena *arena, DF_Window *ws, DF_CmdList *cmds)
|
||||
d_fancy_string_list_push(scratch.arena, &strs, &str2);
|
||||
D_FancyString str3 = {df_font_from_slot(DF_FontSlot_Code), str8_lit("very fancy text!"), v4f32(1, 0.8f, 0.4f, 1), 18.f, 4.f, 4.f};
|
||||
d_fancy_string_list_push(scratch.arena, &strs, &str3);
|
||||
D_FancyRunList runs = d_fancy_run_list_from_fancy_string_list(scratch.arena, 0, &strs);
|
||||
D_FancyRunList runs = d_fancy_run_list_from_fancy_string_list(scratch.arena, 0, 0, &strs);
|
||||
F_Run trailer_run = f_push_run_from_string(scratch.arena, df_font_from_slot(DF_FontSlot_Main), 16.f, 0, 0, 0, str8_lit("..."));
|
||||
F32 limit = 500.f + sin_f32(df_time_in_seconds()/10.f)*200.f;
|
||||
d_truncated_fancy_run_list(p, &runs, limit, trailer_run);
|
||||
@@ -9302,12 +9318,12 @@ df_font_size_from_slot(DF_Window *ws, DF_FontSlot slot)
|
||||
default:
|
||||
case DF_FontSlot_Main:
|
||||
{
|
||||
F32 size_at_96dpi = 9.f;
|
||||
F32 size_at_96dpi = 10.f;
|
||||
result = dpi * ((size_at_96dpi / 96.f) + ws->main_font_size_delta);
|
||||
}break;
|
||||
case DF_FontSlot_Code:
|
||||
{
|
||||
F32 size_at_96dpi = 9.f;
|
||||
F32 size_at_96dpi = 10.f;
|
||||
result = dpi * ((size_at_96dpi / 96.f) + ws->code_font_size_delta);
|
||||
}break;
|
||||
case DF_FontSlot_Icons:
|
||||
@@ -9873,12 +9889,13 @@ df_cmd_spec_button(DF_CmdSpec *spec)
|
||||
UI_BoxFlag_DrawActiveEffects|
|
||||
UI_BoxFlag_Clickable,
|
||||
"###cmd_%p", spec);
|
||||
UI_Parent(box) UI_HeightFill
|
||||
UI_Parent(box) UI_HeightFill UI_Padding(ui_em(1.f, 1.f))
|
||||
{
|
||||
DF_IconKind canonical_icon = spec->info.canonical_icon_kind;
|
||||
if(canonical_icon != DF_IconKind_Null)
|
||||
{
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
@@ -9943,8 +9960,13 @@ df_icon_button(DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string)
|
||||
{
|
||||
ui_spacer(ui_pct(1, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
UI_PrefHeight(ui_pct(1, 0))
|
||||
UI_FlagsAdd(UI_BoxFlag_DisableTextTrunc|UI_BoxFlag_DrawTextWeak)
|
||||
@@ -9964,6 +9986,10 @@ df_icon_button(DF_IconKind kind, FuzzyMatchRangeList *matches, String8 string)
|
||||
{
|
||||
ui_spacer(ui_pct(1, 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
}
|
||||
UI_Signal result = ui_signal_from_box(box);
|
||||
return result;
|
||||
@@ -9986,7 +10012,7 @@ internal void
|
||||
df_entity_tooltips(DF_Entity *entity)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
switch(entity->kind)
|
||||
DF_Palette(DF_PaletteCode_Floating) switch(entity->kind)
|
||||
{
|
||||
default:{}break;
|
||||
case DF_EntityKind_File:
|
||||
@@ -10023,7 +10049,10 @@ df_entity_tooltips(DF_Entity *entity)
|
||||
{
|
||||
UI_PrefWidth(ui_children_sum(1)) UI_Row DF_Palette(DF_PaletteCode_DefaultNegative)
|
||||
{
|
||||
UI_PrefWidth(ui_em(1.5f, 1.f)) UI_Font(df_font_from_slot(DF_FontSlot_Icons)) ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
UI_PrefWidth(ui_em(1.5f, 1.f))
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
UI_PrefWidth(ui_text_dim(10, 1)) ui_label(explanation);
|
||||
}
|
||||
}
|
||||
@@ -10172,7 +10201,7 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam
|
||||
"entity_ref_button_%p", entity);
|
||||
|
||||
//- rjf: build contents
|
||||
UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 0))
|
||||
UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 0)) UI_Padding(ui_em(1.f, 1.f))
|
||||
{
|
||||
DF_EntityKindFlags kind_flags = df_g_entity_kind_flags_table[entity->kind];
|
||||
DF_EntityOpFlags op_flags = df_g_entity_kind_op_flags_table[entity->kind];
|
||||
@@ -10188,6 +10217,7 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(1.875f, 1.f))
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
ui_label(df_g_icon_kind_text_table[icon]);
|
||||
@@ -10199,6 +10229,7 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam
|
||||
UI_Box *info_box = &ui_g_nil_box;
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
{
|
||||
info_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_DrawTextWeak|UI_BoxFlag_Clickable, "%S###%p_temp_info", df_g_icon_kind_text_table[DF_IconKind_Info], entity);
|
||||
}
|
||||
@@ -10212,7 +10243,11 @@ df_entity_desc_button(DF_Window *ws, DF_Entity *entity, FuzzyMatchRangeList *nam
|
||||
String8 label = df_display_string_from_entity(scratch.arena, entity);
|
||||
UI_Palette(ui_build_palette(ui_top_palette(), .text = entity_color))
|
||||
UI_Font(kind_flags&DF_EntityKindFlag_NameIsCode ? df_font_from_slot(DF_FontSlot_Code) : ui_top_font())
|
||||
UI_Flags(entity->kind == DF_EntityKind_Thread ? UI_BoxFlag_DisableTruncatedHover : 0)
|
||||
UI_Flags((entity->kind == DF_EntityKind_Thread ||
|
||||
entity->kind == DF_EntityKind_Breakpoint ||
|
||||
entity->kind == DF_EntityKind_WatchPin)
|
||||
? UI_BoxFlag_DisableTruncatedHover
|
||||
: 0)
|
||||
{
|
||||
UI_Signal label_sig = ui_label(label);
|
||||
if(name_matches != 0)
|
||||
@@ -10344,6 +10379,7 @@ df_entity_src_loc_button(DF_Window *ws, DF_Entity *entity, TxtPt point)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[icon]);
|
||||
ui_labelf("%S:%I64d:%I64d", filename, point.line, point.column);
|
||||
}
|
||||
@@ -10437,8 +10473,8 @@ internal UI_BOX_CUSTOM_DRAW(df_thread_box_draw_extensions)
|
||||
{
|
||||
F32 lock_icon_off = ui_top_font_size()*0.2f;
|
||||
Vec4F32 lock_icon_color = df_rgba_from_theme_color(DF_ThemeColor_DefaultTextNegative);
|
||||
d_text(ui_icon_font(),
|
||||
box->font_size, 0, 0,
|
||||
d_text(df_font_from_slot(DF_FontSlot_Icons),
|
||||
box->font_size, 0, 0, F_RunFlag_Smooth,
|
||||
v2f32((box->rect.x0 + box->rect.x1)/2 + lock_icon_off/2,
|
||||
box->rect.y0 + lock_icon_off/2),
|
||||
lock_icon_color,
|
||||
@@ -10499,7 +10535,7 @@ internal UI_BOX_CUSTOM_DRAW(df_bp_box_draw_extensions)
|
||||
bp_center.x + remap_bar_thickness,
|
||||
bp_center.y + ClampBot(remap_px_delta, 0) + remap_bar_thickness),
|
||||
remap_color, 2.f, 0, 1.f);
|
||||
d_text(box->font, box->font_size, 0, 0,
|
||||
d_text(box->font, box->font_size, 0, 0, F_RunFlag_Smooth,
|
||||
v2f32(bp_text_pos.x,
|
||||
bp_center.y + remap_px_delta),
|
||||
remap_color,
|
||||
@@ -10528,6 +10564,9 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
df_rgba_from_theme_color(DF_ThemeColor_LineInfoBackground2),
|
||||
df_rgba_from_theme_color(DF_ThemeColor_LineInfoBackground3),
|
||||
};
|
||||
UI_Palette *margin_palette = df_palette_from_code(DF_PaletteCode_Floating);
|
||||
UI_Palette *margin_contents_palette = ui_build_palette(df_palette_from_code(DF_PaletteCode_Floating));
|
||||
margin_contents_palette->background = v4f32(0, 0, 0, 0);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: build top-level container
|
||||
@@ -10582,7 +10621,10 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
line_num += 1, line_idx += 1)
|
||||
{
|
||||
ctx_menu_keys[line_idx] = ui_key_from_stringf(top_container_box->key, "line_ctx_%I64d", line_num);
|
||||
UI_CtxMenu(ctx_menu_keys[line_idx]) UI_PrefWidth(ui_em(37.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(ctx_menu_keys[line_idx])
|
||||
DF_Palette(DF_PaletteCode_ImplicitContents)
|
||||
UI_PrefWidth(ui_em(37.f, 1.f))
|
||||
{
|
||||
DF_TextLineSrc2DasmInfoList *line_src2dasm_list = ¶ms->line_src2dasm[line_idx];
|
||||
DF_TextLineDasm2SrcInfoList *line_dasm2src_list = ¶ms->line_dasm2src[line_idx];
|
||||
@@ -10648,7 +10690,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
//- rjf: build priority margin
|
||||
//
|
||||
UI_Box *priority_margin_container_box = &ui_g_nil_box;
|
||||
if(params->flags & DF_CodeSliceFlag_PriorityMargin) UI_Focus(UI_FocusKind_Off) UI_Parent(top_container_box) ProfScope("build priority margins")
|
||||
if(params->flags & DF_CodeSliceFlag_PriorityMargin) UI_Focus(UI_FocusKind_Off) UI_Parent(top_container_box) UI_Palette(margin_palette) ProfScope("build priority margins")
|
||||
{
|
||||
if(params->margin_float_off_px != 0)
|
||||
{
|
||||
@@ -10656,13 +10698,12 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||
ui_build_box_from_key(0, ui_key_zero());
|
||||
ui_set_next_fixed_x(params->margin_float_off_px);
|
||||
ui_set_next_flags(UI_BoxFlag_DrawBackground);
|
||||
}
|
||||
ui_set_next_pref_width(ui_px(params->priority_margin_width_px, 1));
|
||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||
ui_set_next_child_layout_axis(Axis2_Y);
|
||||
priority_margin_container_box = ui_build_box_from_string(UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable), str8_lit("priority_margin_container"));
|
||||
UI_Parent(priority_margin_container_box) UI_PrefHeight(ui_px(params->line_height_px, 1.f))
|
||||
UI_Parent(priority_margin_container_box) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) UI_Palette(margin_contents_palette)
|
||||
{
|
||||
U64 line_idx = 0;
|
||||
for(S64 line_num = params->line_num_range.min;
|
||||
@@ -10720,8 +10761,9 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
|
||||
// rjf: build thread box
|
||||
ui_set_next_hover_cursor(OS_Cursor_UpDownLeftRight);
|
||||
ui_set_next_font(ui_icon_font());
|
||||
ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons));
|
||||
ui_set_next_font_size(params->font_size);
|
||||
ui_set_next_run_flags(F_RunFlag_Smooth);
|
||||
ui_set_next_pref_width(ui_pct(1, 0));
|
||||
ui_set_next_pref_height(ui_pct(1, 0));
|
||||
ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color));
|
||||
@@ -10810,7 +10852,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
//- rjf: build catchall margin
|
||||
//
|
||||
UI_Box *catchall_margin_container_box = &ui_g_nil_box;
|
||||
if(params->flags & DF_CodeSliceFlag_CatchallMargin) UI_Focus(UI_FocusKind_Off) UI_Parent(top_container_box) ProfScope("build catchall margins")
|
||||
if(params->flags & DF_CodeSliceFlag_CatchallMargin) UI_Focus(UI_FocusKind_Off) UI_Palette(margin_palette) UI_Parent(top_container_box) ProfScope("build catchall margins")
|
||||
{
|
||||
if(params->margin_float_off_px != 0)
|
||||
{
|
||||
@@ -10818,13 +10860,12 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||
ui_build_box_from_key(0, ui_key_zero());
|
||||
ui_set_next_fixed_x(params->margin_float_off_px + params->priority_margin_width_px);
|
||||
ui_set_next_flags(UI_BoxFlag_DrawBackground);
|
||||
}
|
||||
ui_set_next_pref_width(ui_px(params->catchall_margin_width_px, 1));
|
||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||
ui_set_next_child_layout_axis(Axis2_Y);
|
||||
catchall_margin_container_box = ui_build_box_from_string(UI_BoxFlag_DrawSideLeft|UI_BoxFlag_Clickable*!!(params->flags & DF_CodeSliceFlag_Clickable), str8_lit("catchall_margin_container"));
|
||||
UI_Parent(catchall_margin_container_box) UI_PrefHeight(ui_px(params->line_height_px, 1.f))
|
||||
UI_Parent(catchall_margin_container_box) UI_PrefHeight(ui_px(params->line_height_px, 1.f)) UI_Palette(margin_contents_palette)
|
||||
{
|
||||
U64 line_idx = 0;
|
||||
for(S64 line_num = params->line_num_range.min;
|
||||
@@ -10884,8 +10925,9 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
|
||||
// rjf: build thread box
|
||||
ui_set_next_hover_cursor(OS_Cursor_UpDownLeftRight);
|
||||
ui_set_next_font(ui_icon_font());
|
||||
ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons));
|
||||
ui_set_next_font_size(params->font_size);
|
||||
ui_set_next_run_flags(F_RunFlag_Smooth);
|
||||
ui_set_next_pref_width(ui_pct(1, 0));
|
||||
ui_set_next_pref_height(ui_pct(1, 0));
|
||||
ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color));
|
||||
@@ -11010,6 +11052,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
// rjf: build box for breakpoint
|
||||
ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons));
|
||||
ui_set_next_font_size(params->font_size * 1.f);
|
||||
ui_set_next_run_flags(F_RunFlag_Smooth);
|
||||
ui_set_next_hover_cursor(OS_Cursor_HandPoint);
|
||||
ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = bp_color));
|
||||
ui_set_next_text_alignment(UI_TextAlign_Center);
|
||||
@@ -11077,6 +11120,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
// rjf: build box for watch
|
||||
ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons));
|
||||
ui_set_next_font_size(params->font_size * 1.f);
|
||||
ui_set_next_run_flags(F_RunFlag_Smooth);
|
||||
ui_set_next_hover_cursor(OS_Cursor_HandPoint);
|
||||
ui_set_next_palette(ui_build_palette(ui_top_palette(), .text = color));
|
||||
ui_set_next_text_alignment(UI_TextAlign_Center);
|
||||
@@ -11208,7 +11252,9 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder, "###exception_info");
|
||||
UI_Parent(box) UI_PrefWidth(ui_text_dim(10, 1))
|
||||
{
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons)) ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
ui_label(explanation);
|
||||
}
|
||||
}
|
||||
@@ -11259,6 +11305,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
}
|
||||
UI_PrefWidth(ui_em(1.5f, 1.f))
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_Palette(ui_build_palette(ui_top_palette(), .text = pin_color))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Flags(UI_BoxFlag_DisableTextTrunc)
|
||||
@@ -11577,7 +11624,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
{
|
||||
TxtRngColorPairNode *n = push_array(scratch.arena, TxtRngColorPairNode, 1);
|
||||
n->rng = txt_rng(*cursor, *mark);
|
||||
n->color = ui_top_palette()->colors[DF_ThemeColor_Selection];
|
||||
n->color = ui_top_palette()->colors[UI_ColorCode_Selection];
|
||||
SLLQueuePush(first_txt_rng_color_pair, last_txt_rng_color_pair, n);
|
||||
}
|
||||
|
||||
@@ -11621,12 +11668,8 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||
ui_build_box_from_key(0, ui_key_zero());
|
||||
ui_set_next_fixed_x(params->margin_float_off_px);
|
||||
ui_set_next_flags(UI_BoxFlag_DrawDropShadow|UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawSideRight|UI_BoxFlag_DrawSideLeft);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui_set_next_flags(UI_BoxFlag_DrawSideRight|UI_BoxFlag_DrawSideLeft);
|
||||
}
|
||||
ui_set_next_flags(UI_BoxFlag_DrawSideRight|UI_BoxFlag_DrawSideLeft);
|
||||
ui_set_next_pref_width(ui_px(params->line_num_width_px, 1.f));
|
||||
ui_set_next_pref_height(ui_px(params->line_height_px*(dim_1s64(params->line_num_range)+1), 1.f));
|
||||
UI_Column
|
||||
@@ -11722,6 +11765,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
ui_set_next_flags(UI_BoxFlag_DrawBackground);
|
||||
ui_set_next_palette(ui_build_palette(ui_top_palette(), .background = line_bg_color));
|
||||
}
|
||||
ui_set_next_tab_size(params->tab_size);
|
||||
UI_Box *line_box = ui_build_box_from_key(UI_BoxFlag_DisableTextTrunc|UI_BoxFlag_DrawText|UI_BoxFlag_DisableIDString, line_key);
|
||||
D_Bucket *line_bucket = d_bucket_make();
|
||||
d_push_bucket(line_bucket);
|
||||
@@ -11853,7 +11897,7 @@ df_code_slice(DF_Window *ws, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, DF_
|
||||
}
|
||||
|
||||
// rjf: equip fancy strings to line box
|
||||
ui_box_equip_display_fancy_strings(line_box, params->tab_size, &line_fancy_strings);
|
||||
ui_box_equip_display_fancy_strings(line_box, &line_fancy_strings);
|
||||
|
||||
// rjf: extra rendering for strings that are currently being searched for
|
||||
if(params->search_query.size != 0)
|
||||
@@ -12413,7 +12457,8 @@ df_error_label(String8 string)
|
||||
UI_Signal sig = ui_signal_from_box(box);
|
||||
UI_Parent(box)
|
||||
{
|
||||
ui_set_next_font(ui_icon_font());
|
||||
ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons));
|
||||
ui_set_next_run_flags(F_RunFlag_Smooth);
|
||||
ui_set_next_text_alignment(UI_TextAlign_Center);
|
||||
ui_set_next_flags(UI_BoxFlag_DrawTextWeak);
|
||||
UI_PrefWidth(ui_em(2.25f, 1.f)) ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
@@ -12434,7 +12479,8 @@ df_help_label(String8 string)
|
||||
if(ui_hovering(sig)) UI_PrefWidth(ui_em(2.25f, 1))
|
||||
{
|
||||
result = 1;
|
||||
ui_set_next_font(ui_icon_font());
|
||||
ui_set_next_font(df_font_from_slot(DF_FontSlot_Icons));
|
||||
ui_set_next_run_flags(F_RunFlag_Smooth);
|
||||
ui_set_next_text_alignment(UI_TextAlign_Center);
|
||||
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]);
|
||||
@@ -12604,7 +12650,7 @@ df_code_label(F32 alpha, B32 indirection_size_change, Vec4F32 base_color, String
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
D_FancyStringList fancy_strings = df_fancy_string_list_from_code_string(scratch.arena, alpha, indirection_size_change, base_color, string);
|
||||
UI_Box *box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero());
|
||||
ui_box_equip_display_fancy_strings(box, ui_top_tab_size(), &fancy_strings);
|
||||
ui_box_equip_display_fancy_strings(box, &fancy_strings);
|
||||
scratch_end(scratch);
|
||||
return box;
|
||||
}
|
||||
@@ -12668,7 +12714,8 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx
|
||||
{
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_Flags(UI_BoxFlag_DrawSideLeft)
|
||||
UI_Font(ui_icon_font())
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_Dot]);
|
||||
}
|
||||
|
||||
@@ -12955,7 +13002,7 @@ df_line_edit(DF_LineEditFlags flags, S32 depth, FuzzyMatchRangeList *matches, Tx
|
||||
}
|
||||
}
|
||||
}
|
||||
ui_box_equip_display_fancy_strings(editstr_box, ui_top_tab_size(), &code_fancy_strings);
|
||||
ui_box_equip_display_fancy_strings(editstr_box, &code_fancy_strings);
|
||||
UI_LineEditDrawData *draw_data = push_array(ui_build_arena(), UI_LineEditDrawData, 1);
|
||||
draw_data->edited_string = push_str8_copy(ui_build_arena(), edit_string);
|
||||
draw_data->cursor = *cursor;
|
||||
@@ -14098,10 +14145,18 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds)
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNegative].text = current->colors[DF_ThemeColor_DefaultTextNegative];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNegative].text_weak = current->colors[DF_ThemeColor_DefaultTextWeak];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNegative].border = current->colors[DF_ThemeColor_DefaultBorder];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNeutral].background = current->colors[DF_ThemeColor_DefaultBackground];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNeutral].text = current->colors[DF_ThemeColor_DefaultTextNeutral];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNeutral].text_weak = current->colors[DF_ThemeColor_DefaultTextWeak];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_DefaultNeutral].border = current->colors[DF_ThemeColor_DefaultBorder];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Floating].background = current->colors[DF_ThemeColor_FloatingBackground];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Floating].text = current->colors[DF_ThemeColor_FloatingText];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Floating].text_weak = current->colors[DF_ThemeColor_FloatingTextWeak];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Floating].border = current->colors[DF_ThemeColor_FloatingBorder];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_ImplicitContents].background = v4f32(0, 0, 0, 0);
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_ImplicitContents].text = current->colors[DF_ThemeColor_FloatingText];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_ImplicitContents].text_weak = current->colors[DF_ThemeColor_FloatingTextWeak];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_ImplicitContents].border = v4f32(0, 0, 0, 0);
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_SpecialPositive].background = current->colors[DF_ThemeColor_SpecialPositiveBackground];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_SpecialPositive].text = current->colors[DF_ThemeColor_SpecialPositiveText];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_SpecialPositive].text_weak = current->colors[DF_ThemeColor_SpecialPositiveTextWeak];
|
||||
@@ -14126,7 +14181,7 @@ df_gfx_begin_frame(Arena *arena, DF_CmdList *cmds)
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_TabInactive].text = current->colors[DF_ThemeColor_TabInactiveText];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_TabInactive].text_weak = current->colors[DF_ThemeColor_TabInactiveTextWeak];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_TabInactive].border = current->colors[DF_ThemeColor_TabInactiveBorder];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Code].background = current->colors[DF_ThemeColor_CodeBackground];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Code].background = current->colors[DF_ThemeColor_DefaultBackground];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Code].text = current->colors[DF_ThemeColor_CodeDefault];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Code].text_weak = current->colors[DF_ThemeColor_CodeDefault];
|
||||
df_gfx_state->cfg_palettes[DF_PaletteCode_Code].border = current->colors[DF_ThemeColor_DefaultBorder];
|
||||
|
||||
+9
-4
@@ -379,7 +379,9 @@ typedef enum DF_PaletteCode
|
||||
DF_PaletteCode_Default,
|
||||
DF_PaletteCode_DefaultPositive,
|
||||
DF_PaletteCode_DefaultNegative,
|
||||
DF_PaletteCode_DefaultNeutral,
|
||||
DF_PaletteCode_Floating,
|
||||
DF_PaletteCode_ImplicitContents,
|
||||
DF_PaletteCode_SpecialPositive,
|
||||
DF_PaletteCode_SpecialNegative,
|
||||
DF_PaletteCode_SpecialNeutral,
|
||||
@@ -551,21 +553,24 @@ struct DF_Window
|
||||
// rjf: view state delta history
|
||||
DF_StateDeltaHistory *view_state_hist;
|
||||
|
||||
// rjf: context menu info
|
||||
// rjf: dev interface state
|
||||
B32 dev_menu_is_open;
|
||||
|
||||
// rjf: menu bar state
|
||||
B32 menu_bar_focused;
|
||||
B32 menu_bar_focused_on_press;
|
||||
B32 menu_bar_key_held;
|
||||
B32 menu_bar_focus_press_started;
|
||||
UI_Key drop_completion_ctx_menu_key;
|
||||
DF_Handle drop_completion_entity;
|
||||
DF_Handle drop_completion_panel;
|
||||
|
||||
// rjf: entity context menu state
|
||||
UI_Key entity_ctx_menu_key;
|
||||
DF_Handle entity_ctx_menu_entity;
|
||||
U8 entity_ctx_menu_input_buffer[1024];
|
||||
U64 entity_ctx_menu_input_size;
|
||||
TxtPt entity_ctx_menu_input_cursor;
|
||||
TxtPt entity_ctx_menu_input_mark;
|
||||
|
||||
// rjf: tab context menu state
|
||||
UI_Key tab_ctx_menu_key;
|
||||
DF_Handle tab_ctx_menu_view;
|
||||
|
||||
|
||||
+56
-56
@@ -374,81 +374,81 @@ DF_ThemeColorTable:
|
||||
//- rjf: global ui colors
|
||||
{Selection "Selection" selection 0x99ccff4c 0x99ccff4c 0x99ccff4c 0x99ccff4c 0x99ccff4c 0x99ccff4c 0x99ccff4c 0x99ccff4c 0x99ccff4c }
|
||||
{DropShadow "Drop Shadow" drop_shadow 0x0000007f 0x0000007f 0x0000007f 0x0000007f 0x0000007f 0x0000007f 0x0000007f 0x0000007f 0x0000007f }
|
||||
{CursorActive "Cursor" cursor_active 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 }
|
||||
{CursorInactive "Cursor (Inactive)" cursor_inactive 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{FocusActive "Focus" focus_active 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff }
|
||||
{FocusInactive "Focus (Inactive)" focus_inactive 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{Highlight0 "Highlight 0" highlight_0 0xb27219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{Highlight1 "Highlight 1" highlight_1 0xb27219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{CursorActive "Cursor" cursor_active 0x8bff00ff 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 0x66e566e5 }
|
||||
{CursorInactive "Cursor (Inactive)" cursor_inactive 0xb23217ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{FocusActive "Focus" focus_active 0xfea200ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff 0xb27219ff }
|
||||
{FocusInactive "Focus (Inactive)" focus_inactive 0x904334ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{Highlight0 "Highlight 0" highlight_0 0xfe9603ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{Highlight1 "Highlight 1" highlight_1 0x7bffc7ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{DisabledOverlay "Disabled Overlay" disabled_overlay 0x0000003f 0x0000003f 0x0000003f 0x0000003f 0x0000003f 0x0000003f 0x0000003f 0x0000003f 0x0000003f }
|
||||
|
||||
//- rjf: default ui colors
|
||||
{DefaultText "Default Text" default_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{DefaultTextPositive "Default Text (Positive)" default_text_positive 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{DefaultTextNegative "Default Text (Negative)" default_text_negative 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{DefaultTextWeak "Default Text (Weak)" default_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{DefaultBackground "Default Background" default_background 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{DefaultBorder "Default Border" default_border 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
{DefaultText "Default Text" default_text 0xbebebeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{DefaultTextPositive "Default Text (Positive)" default_text_positive 0x4dc221ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{DefaultTextNegative "Default Text (Negative)" default_text_negative 0xc56553ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{DefaultTextNeutral "Default Text (Neutral)" default_text_neutral 0x327fb2ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{DefaultTextWeak "Default Text (Weak)" default_text_weak 0xa4a4a4fe 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{DefaultBackground "Default Background" default_background 0x1b1b1bfe 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{DefaultBorder "Default Border" default_border 0x3f3f3ffe 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
|
||||
//- rjf: floating ui colors
|
||||
{FloatingText "Floating Text" floating_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{FloatingTextPositive "Floating Text (Positive)" floating_text_positive 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{FloatingTextNegative "Floating Text (Negative)" floating_text_negative 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{FloatingTextWeak "Floating Text (Weak)" floating_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{FloatingBackground "Floating Background" floating_background 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{FloatingBorder "Floating Border" floating_border 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
{FloatingText "Floating Text" floating_text 0xbebebeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{FloatingTextPositive "Floating Text (Positive)" floating_text_positive 0x4dc220ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{FloatingTextNegative "Floating Text (Negative)" floating_text_negative 0xc56452ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{FloatingTextWeak "Floating Text (Weak)" floating_text_weak 0xa4a4a4ff 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{FloatingBackground "Floating Background" floating_background 0x33333333 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{FloatingBorder "Floating Border" floating_border 0x3f3f3ffd 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
|
||||
//- rjf: special button colors
|
||||
{SpecialPositiveText "Special Positive Text" special_positive_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{SpecialPositiveTextWeak "Special Positive Text (Weak)" special_positive_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{SpecialPositiveBackground "Special Positive Background" special_positive_background 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{SpecialPositiveBorder "Special Positive Border" special_positive_border 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 }
|
||||
{SpecialNegativeText "Special Negative Text" special_negative_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{SpecialNegativeTextWeak "Special Negative Text (Weak)" special_negative_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{SpecialNegativeBackground "Special Negative Background" special_negative_background 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{SpecialNegativeBorder "Special Negative Border" special_negative_border 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 }
|
||||
{SpecialNeutralText "Special Neutral Text" special_neutral_text 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff }
|
||||
{SpecialNeutralTextWeak "Special Neutral Text (Weak)" special_neutral_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{SpecialNeutralBackground "Special Neutral Background" special_neutral_background 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff }
|
||||
{SpecialNeutralBorder "Special Neutral Border" special_neutral_border 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 }
|
||||
{SpecialPositiveText "Special Positive Text" special_positive_text 0xfefefeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{SpecialPositiveTextWeak "Special Positive Text (Weak)" special_positive_text_weak 0xa4a4a4fe 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{SpecialPositiveBackground "Special Positive Background" special_positive_background 0x2d7e3eff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{SpecialPositiveBorder "Special Positive Border" special_positive_border 0x3f3f3ffd 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 }
|
||||
{SpecialNegativeText "Special Negative Text" special_negative_text 0xfefefeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{SpecialNegativeTextWeak "Special Negative Text (Weak)" special_negative_text_weak 0xa4a4a4fd 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{SpecialNegativeBackground "Special Negative Background" special_negative_background 0x803425ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{SpecialNegativeBorder "Special Negative Border" special_negative_border 0x3f3f3ffd 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 }
|
||||
{SpecialNeutralText "Special Neutral Text" special_neutral_text 0xfefefeff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff }
|
||||
{SpecialNeutralTextWeak "Special Neutral Text (Weak)" special_neutral_text_weak 0xa4a4a4fd 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{SpecialNeutralBackground "Special Neutral Background" special_neutral_background 0x355b6eff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff 0x327fb2ff }
|
||||
{SpecialNeutralBorder "Special Neutral Border" special_neutral_border 0x3f3f3ffd 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 0xffffff33 }
|
||||
|
||||
//- rjf: menu bar colors
|
||||
{MenuBarText "Menu Bar Text" menu_bar_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{MenuBarText "Menu Bar Text" menu_bar_text 0xfefefeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{MenuBarTextWeak "Menu Bar Text (Weak)" menu_bar_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{MenuBarTextPositive "Menu Bar Text (Positive)" menu_bar_text_positive 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff 0x32b219ff }
|
||||
{MenuBarTextNegative "Menu Bar Text (Negative)" menu_bar_text_negative 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{MenuBarBackground "Menu Bar Background" menu_bar_background 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{MenuBarBackground "Menu Bar Background" menu_bar_background 0x3e4c577f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{MenuBarBorder "Menu Bar Border" menu_bar_border 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
|
||||
//- rjf: tab colors
|
||||
{TabActiveText "Tab Text" tab_active_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{TabActiveText "Tab Text" tab_active_text 0xffffffff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{TabActiveTextWeak "Tab Text (Weak)" tab_active_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{TabActiveBackground "Tab Background" tab_active_background 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 }
|
||||
{TabActiveBorder "Tab Border" tab_active_border 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
{TabInactiveText "Tab Text (Inactive)" tab_inactive_text 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{TabInactiveTextWeak "Tab Text (Inactive, Weak)" tab_inactive_text_weak 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{TabInactiveBackground "Tab Background (Inactive)" tab_inactive_background 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f }
|
||||
{TabActiveBackground "Tab Background" tab_active_background 0x7b4d27fe 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 0xa87a4c99 }
|
||||
{TabActiveBorder "Tab Border" tab_active_border 0xb48300fd 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
{TabInactiveText "Tab Text (Inactive)" tab_inactive_text 0xa4a4a4fd 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{TabInactiveTextWeak "Tab Text (Inactive, Weak)" tab_inactive_text_weak 0x808080fd 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f 0xffffff7f }
|
||||
{TabInactiveBackground "Tab Background (Inactive)" tab_inactive_background 0x3e4c577f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f 0x42474c7f }
|
||||
{TabInactiveBorder "Tab Border (Inactive)" tab_inactive_border 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 0xffffff19 }
|
||||
|
||||
//- rjf: code ui colors
|
||||
{CodeBackground "Code Background" code_background 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{CodeBackgroundNegative "Code Background (Negative)" code_background_negative 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{CodeLineNumbersActive "Code Line Numbers" code_line_numbers_active 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{CodeLineNumbersInactive "Code Line Numbers (Inactive)" code_line_numbers_inactive 0xa5a5a5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{CodeBackgroundNegative "Code Background (Negative)" code_background_negative 0x3b1f1ffe 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f 0x3333337f }
|
||||
{CodeLineNumbersActive "Code Line Numbers" code_line_numbers_active 0xbebebeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{CodeLineNumbersInactive "Code Line Numbers (Inactive)" code_line_numbers_inactive 0x7f7f7fff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
|
||||
//- rjf: code text colors
|
||||
{CodeDefault "Code (Default)" code_default 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{CodeProcedure "Code (Procedure)" code_procedure 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff }
|
||||
{CodeType "Code (Type)" code_type 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff }
|
||||
{CodeLocal "Code (Local)" code_local 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff }
|
||||
{CodeRegister "Code (Register)" code_register 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff }
|
||||
{CodeKeyword "Code (Keyword)" code_keyword 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff }
|
||||
{CodeDelimiterOperator "Code (Delimiters/Operators)" code_delimiter_operator 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff }
|
||||
{CodeNumeric "Code (Numeric)" code_numeric 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff }
|
||||
{CodeNumericAltDigitGroup "Code (Numeric, Alt. Digit Group)" code_numeric_alt_digit_group 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff }
|
||||
{CodeString "Code (String)" code_string 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff }
|
||||
{CodeMeta "Code (Meta)" code_meta 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff }
|
||||
{CodeComment "Code (Comment)" code_comment 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff }
|
||||
{CodeDefault "Code (Default)" code_default 0xbebebeff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff 0xe5e5e5ff }
|
||||
{CodeProcedure "Code (Procedure)" code_procedure 0x6093c2ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff 0x7fcc99ff }
|
||||
{CodeType "Code (Type)" code_type 0xecb31aff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff 0x66b2e5ff }
|
||||
{CodeLocal "Code (Local)" code_local 0xadc9e0ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff 0xfe9548ff }
|
||||
{CodeRegister "Code (Register)" code_register 0xb7afd5ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff 0xd45d90ff }
|
||||
{CodeKeyword "Code (Keyword)" code_keyword 0xb18e32ff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff 0xf7bf5eff }
|
||||
{CodeDelimiterOperator "Code (Delimiters/Operators)" code_delimiter_operator 0x7f7f7fff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff 0x994c32ff }
|
||||
{CodeNumeric "Code (Numeric)" code_numeric 0x89b379ff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff 0x4ce54cff }
|
||||
{CodeNumericAltDigitGroup "Code (Numeric, Alt. Digit Group)" code_numeric_alt_digit_group 0x608752ff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff 0x4ca54cff }
|
||||
{CodeString "Code (String)" code_string 0x89b379ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff 0xe5cc66ff }
|
||||
{CodeMeta "Code (Meta)" code_meta 0x906f81ff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff 0xe54c4cff }
|
||||
{CodeComment "Code (Comment)" code_comment 0x717171ff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff 0x7f7f7fff }
|
||||
|
||||
//- rjf: debugging colors
|
||||
{LineInfoBackground0 "Line Info Background 0" line_info_background_0 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f }
|
||||
@@ -458,7 +458,7 @@ DF_ThemeColorTable:
|
||||
{LineInfoBackground4 "Line Info Background 4" line_info_background_4 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f }
|
||||
{LineInfoBackground5 "Line Info Background 5" line_info_background_5 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f 0xfe82493f }
|
||||
{LineInfoBackground6 "Line Info Background 6" line_info_background_6 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f 0xffba173f }
|
||||
{LineInfoBackground7 "Line Info Background 7" line_info_background_7 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f }
|
||||
{LineInfoBackground7 "Line Info Background 7" line_info_background_7 0xcefd693f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f 0x99503d3f }
|
||||
{Thread0 "Thread 0" thread_0 0xffcb7fff 0xffcb7fff 0xffcb7fff 0xffcb7fff 0xffcb7fff 0xffcb7fff 0xffcb7fff 0xffcb7fff 0xffcb7fff }
|
||||
{Thread1 "Thread 1" thread_1 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff 0xb2ff65ff }
|
||||
{Thread2 "Thread 2" thread_2 0xff99e5ff 0xff99e5ff 0xff99e5ff 0xff99e5ff 0xff99e5ff 0xff99e5ff 0xff99e5ff 0xff99e5ff 0xff99e5ff }
|
||||
@@ -469,7 +469,7 @@ DF_ThemeColorTable:
|
||||
{Thread7 "Thread 7" thread_7 0x65ff4cff 0x65ff4cff 0x65ff4cff 0x65ff4cff 0x65ff4cff 0x65ff4cff 0x65ff4cff 0x65ff4cff 0x65ff4cff }
|
||||
{ThreadUnwound "Thread (Unwound)" thread_unwound 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff 0xb2ccd8ff }
|
||||
{ThreadError "Thread (Error)" thread_error 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{Breakpoint "Breakpoint" breakpoint 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
{Breakpoint "Breakpoint" breakpoint 0xa72a12ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff 0xb23219ff }
|
||||
|
||||
//- rjf: behavioral colors
|
||||
{DropSiteOverlay "Drop Site Overlay" drop_site_overlay 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c 0xffffff0c }
|
||||
|
||||
@@ -357,7 +357,7 @@ DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(rgba)
|
||||
d_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr);
|
||||
d_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren);
|
||||
}
|
||||
ui_box_equip_display_fancy_strings(text_box, 0, &fancy_strings);
|
||||
ui_box_equip_display_fancy_strings(text_box, &fancy_strings);
|
||||
}
|
||||
|
||||
//- rjf: build color box
|
||||
|
||||
+16
-44
@@ -2359,41 +2359,6 @@ DF_VIEW_UI_FUNCTION_DEF(Commands)
|
||||
{
|
||||
DF_CmdListerItem *item = &cmd_array.v[row_idx];
|
||||
|
||||
//- rjf: build context menu for this command
|
||||
UI_Key item_ctx_menu_key = ui_key_from_stringf(ui_key_zero(), "###%p_cmd_ctx_%p", view, item->cmd_spec);
|
||||
UI_CtxMenu(item_ctx_menu_key) UI_PrefWidth(ui_em(33, 1))
|
||||
{
|
||||
// rjf: row with icon & name
|
||||
UI_Row UI_PrefWidth(ui_text_dim(10, 1)) UI_PrefHeight(ui_pct(1, 0))
|
||||
{
|
||||
// rjf: icon
|
||||
DF_IconKind icon = item->cmd_spec->info.canonical_icon_kind;
|
||||
if(icon != DF_IconKind_Null)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_PrefWidth(ui_em(2.25f, 1.f))
|
||||
{
|
||||
ui_label(df_g_icon_kind_text_table[icon]);
|
||||
}
|
||||
|
||||
// rjf: display name
|
||||
ui_label(item->cmd_spec->info.display_name);
|
||||
}
|
||||
|
||||
// rjf: row with ipc syntax
|
||||
UI_Row UI_PrefWidth(ui_text_dim(10, 1)) UI_PrefHeight(ui_pct(1, 0))
|
||||
{
|
||||
// rjf: name
|
||||
UI_TextAlignment(UI_TextAlign_Left)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Code))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Code))
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
ui_label(item->cmd_spec->info.string);
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: build row contents
|
||||
ui_set_next_hover_cursor(OS_Cursor_HandPoint);
|
||||
ui_set_next_child_layout_axis(Axis2_X);
|
||||
@@ -2415,6 +2380,7 @@ DF_VIEW_UI_FUNCTION_DEF(Commands)
|
||||
UI_Column
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_HeightFill
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
@@ -2462,10 +2428,6 @@ DF_VIEW_UI_FUNCTION_DEF(Commands)
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_CompleteQuery));
|
||||
}
|
||||
if(ui_right_clicked(sig))
|
||||
{
|
||||
ui_ctx_menu_open(item_ctx_menu_key, ui_key_zero(), sub_2f32(ui_mouse(), v2f32(2, 2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2812,6 +2774,7 @@ DF_VIEW_UI_FUNCTION_DEF(FileSystem)
|
||||
// rjf: icons
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(3.f, 1.f))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
{
|
||||
@@ -2860,6 +2823,7 @@ DF_VIEW_UI_FUNCTION_DEF(FileSystem)
|
||||
// rjf: icon to signify directory
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(3.f, 1.f))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
{
|
||||
@@ -3048,6 +3012,7 @@ DF_VIEW_UI_FUNCTION_DEF(SystemProcesses)
|
||||
// rjf: icon
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_PrefWidth(ui_em(3.f, 1.f))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
{
|
||||
@@ -3221,6 +3186,7 @@ DF_VIEW_UI_FUNCTION_DEF(EntityLister)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_FlagsAdd(UI_BoxFlag_DrawTextWeak)
|
||||
UI_PrefWidth(ui_text_dim(10, 1))
|
||||
ui_label(df_g_icon_kind_text_table[icon_kind]);
|
||||
@@ -4974,6 +4940,7 @@ DF_VIEW_UI_FUNCTION_DEF(CallStack)
|
||||
UI_TableCell
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_FontSize(df_font_size_from_slot(ws, DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
UI_WidthFill
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_FocusHot((row_selected && cs->cursor.x == 0) ? UI_FocusKind_On : UI_FocusKind_Off)
|
||||
@@ -5054,7 +5021,7 @@ DF_VIEW_UI_FUNCTION_DEF(CallStack)
|
||||
d_fancy_string_list_push(scratch.arena, &fstrs, &sep);
|
||||
d_fancy_string_list_concat_in_place(&fstrs, &symbol_type_fstrs);
|
||||
UI_Box *label = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero());
|
||||
ui_box_equip_display_fancy_strings(label, 0, &fstrs);
|
||||
ui_box_equip_display_fancy_strings(label, &fstrs);
|
||||
}
|
||||
}
|
||||
UI_Signal sig = ui_signal_from_box(box);
|
||||
@@ -6031,7 +5998,9 @@ DF_VIEW_UI_FUNCTION_DEF(Code)
|
||||
UI_PrefWidth(ui_text_dim(10, 1))
|
||||
DF_Palette(DF_PaletteCode_DefaultNegative)
|
||||
{
|
||||
UI_Font(ui_icon_font()) ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
ui_label(df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
ui_labelf("Could not find \"%S\".", full_path);
|
||||
}
|
||||
UI_PrefHeight(ui_em(3, 1))
|
||||
@@ -6584,6 +6553,7 @@ DF_VIEW_UI_FUNCTION_DEF(Code)
|
||||
UI_Box *box = &ui_g_nil_box;
|
||||
DF_Palette(DF_PaletteCode_SpecialNegative)
|
||||
UI_Font(df_font_from_slot(DF_FontSlot_Icons))
|
||||
UI_RunFlags(F_RunFlag_Smooth)
|
||||
{
|
||||
box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|UI_BoxFlag_Clickable, "%S###file_ood_warning", df_g_icon_kind_text_table[DF_IconKind_WarningBig]);
|
||||
}
|
||||
@@ -8966,7 +8936,7 @@ DF_VIEW_UI_FUNCTION_DEF(Memory)
|
||||
cell_bg_rgba = df_rgba_from_theme_color(DF_ThemeColor_Selection);
|
||||
}
|
||||
UI_Box *cell_box = ui_build_box_from_key(UI_BoxFlag_DrawText|cell_flags, ui_key_zero());
|
||||
ui_box_equip_display_fancy_strings(cell_box, 0, &byte_fancy_strings[byte_value]);
|
||||
ui_box_equip_display_fancy_strings(cell_box, &byte_fancy_strings[byte_value]);
|
||||
{
|
||||
F32 off = 0;
|
||||
for(Annotation *a = annotation; a != 0; a = a->next)
|
||||
@@ -9668,7 +9638,7 @@ DF_VIEW_UI_FUNCTION_DEF(Theme)
|
||||
|
||||
//- rjf: build preset ctx menu
|
||||
UI_Key preset_ctx_menu_key = ui_key_from_stringf(ui_key_zero(), "%p_preset_ctx_menu", view);
|
||||
UI_CtxMenu(preset_ctx_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating) UI_CtxMenu(preset_ctx_menu_key) UI_PrefWidth(ui_em(30.f, 1.f))
|
||||
{
|
||||
for(DF_ThemePreset preset = (DF_ThemePreset)0;
|
||||
preset < DF_ThemePreset_COUNT;
|
||||
@@ -9704,7 +9674,9 @@ DF_VIEW_UI_FUNCTION_DEF(Theme)
|
||||
color < DF_ThemeColor_COUNT;
|
||||
color = (DF_ThemeColor)(color+1))
|
||||
{
|
||||
UI_CtxMenu(color_ctx_menu_keys[color]) UI_Padding(ui_em(1.5f, 1.f))
|
||||
DF_Palette(DF_PaletteCode_Floating)
|
||||
UI_CtxMenu(color_ctx_menu_keys[color])
|
||||
UI_Padding(ui_em(1.5f, 1.f))
|
||||
UI_PrefWidth(ui_em(28.5f, 1)) UI_PrefHeight(ui_children_sum(1.f))
|
||||
{
|
||||
// rjf: build title
|
||||
|
||||
@@ -324,67 +324,67 @@ Vec4F32 df_g_theme_preset_colors__default_dark[85] =
|
||||
rgba_from_u32_lit_comp(0xff00ffff),
|
||||
rgba_from_u32_lit_comp(0x99ccff4c),
|
||||
rgba_from_u32_lit_comp(0x0000007f),
|
||||
rgba_from_u32_lit_comp(0x66e566e5),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb27219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb27219ff),
|
||||
rgba_from_u32_lit_comp(0xb27219ff),
|
||||
rgba_from_u32_lit_comp(0x8bff00ff),
|
||||
rgba_from_u32_lit_comp(0xb23217ff),
|
||||
rgba_from_u32_lit_comp(0xfea200ff),
|
||||
rgba_from_u32_lit_comp(0x904334ff),
|
||||
rgba_from_u32_lit_comp(0xfe9603ff),
|
||||
rgba_from_u32_lit_comp(0x7bffc7ff),
|
||||
rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xbebebeff),
|
||||
rgba_from_u32_lit_comp(0x4dc221ff),
|
||||
rgba_from_u32_lit_comp(0xc56553ff),
|
||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
||||
rgba_from_u32_lit_comp(0xa4a4a4fe),
|
||||
rgba_from_u32_lit_comp(0x1b1b1bfe),
|
||||
rgba_from_u32_lit_comp(0x3f3f3ffe),
|
||||
rgba_from_u32_lit_comp(0xbebebeff),
|
||||
rgba_from_u32_lit_comp(0x4dc220ff),
|
||||
rgba_from_u32_lit_comp(0xc56452ff),
|
||||
rgba_from_u32_lit_comp(0xa4a4a4ff),
|
||||
rgba_from_u32_lit_comp(0x33333333),
|
||||
rgba_from_u32_lit_comp(0x3f3f3ffd),
|
||||
rgba_from_u32_lit_comp(0xfefefeff),
|
||||
rgba_from_u32_lit_comp(0xa4a4a4fe),
|
||||
rgba_from_u32_lit_comp(0x2d7e3eff),
|
||||
rgba_from_u32_lit_comp(0x3f3f3ffd),
|
||||
rgba_from_u32_lit_comp(0xfefefeff),
|
||||
rgba_from_u32_lit_comp(0xa4a4a4fd),
|
||||
rgba_from_u32_lit_comp(0x803425ff),
|
||||
rgba_from_u32_lit_comp(0x3f3f3ffd),
|
||||
rgba_from_u32_lit_comp(0xfefefeff),
|
||||
rgba_from_u32_lit_comp(0xa4a4a4fd),
|
||||
rgba_from_u32_lit_comp(0x355b6eff),
|
||||
rgba_from_u32_lit_comp(0x3f3f3ffd),
|
||||
rgba_from_u32_lit_comp(0xfefefeff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3e4c577f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff33),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff33),
|
||||
rgba_from_u32_lit_comp(0xffffffff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x327fb2ff),
|
||||
rgba_from_u32_lit_comp(0xffffff33),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x7b4d27fe),
|
||||
rgba_from_u32_lit_comp(0xb48300fd),
|
||||
rgba_from_u32_lit_comp(0xa4a4a4fd),
|
||||
rgba_from_u32_lit_comp(0x808080fd),
|
||||
rgba_from_u32_lit_comp(0x3e4c577f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0xa87a4c99),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xa5a5a5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x7fcc99ff),
|
||||
rgba_from_u32_lit_comp(0x66b2e5ff),
|
||||
rgba_from_u32_lit_comp(0xfe9548ff),
|
||||
rgba_from_u32_lit_comp(0xd45d90ff),
|
||||
rgba_from_u32_lit_comp(0xf7bf5eff),
|
||||
rgba_from_u32_lit_comp(0x994c32ff),
|
||||
rgba_from_u32_lit_comp(0x4ce54cff),
|
||||
rgba_from_u32_lit_comp(0x4ca54cff),
|
||||
rgba_from_u32_lit_comp(0xe5cc66ff),
|
||||
rgba_from_u32_lit_comp(0xe54c4cff),
|
||||
rgba_from_u32_lit_comp(0x3b1f1ffe),
|
||||
rgba_from_u32_lit_comp(0xbebebeff),
|
||||
rgba_from_u32_lit_comp(0x7f7f7fff),
|
||||
rgba_from_u32_lit_comp(0xbebebeff),
|
||||
rgba_from_u32_lit_comp(0x6093c2ff),
|
||||
rgba_from_u32_lit_comp(0xecb31aff),
|
||||
rgba_from_u32_lit_comp(0xadc9e0ff),
|
||||
rgba_from_u32_lit_comp(0xb7afd5ff),
|
||||
rgba_from_u32_lit_comp(0xb18e32ff),
|
||||
rgba_from_u32_lit_comp(0x7f7f7fff),
|
||||
rgba_from_u32_lit_comp(0x89b379ff),
|
||||
rgba_from_u32_lit_comp(0x608752ff),
|
||||
rgba_from_u32_lit_comp(0x89b379ff),
|
||||
rgba_from_u32_lit_comp(0x906f81ff),
|
||||
rgba_from_u32_lit_comp(0x717171ff),
|
||||
rgba_from_u32_lit_comp(0x99503d3f),
|
||||
rgba_from_u32_lit_comp(0xfe82493f),
|
||||
rgba_from_u32_lit_comp(0xffba173f),
|
||||
@@ -392,7 +392,7 @@ rgba_from_u32_lit_comp(0xcefd693f),
|
||||
rgba_from_u32_lit_comp(0x99503d3f),
|
||||
rgba_from_u32_lit_comp(0xfe82493f),
|
||||
rgba_from_u32_lit_comp(0xffba173f),
|
||||
rgba_from_u32_lit_comp(0x99503d3f),
|
||||
rgba_from_u32_lit_comp(0xcefd693f),
|
||||
rgba_from_u32_lit_comp(0xffcb7fff),
|
||||
rgba_from_u32_lit_comp(0xb2ff65ff),
|
||||
rgba_from_u32_lit_comp(0xff99e5ff),
|
||||
@@ -403,7 +403,7 @@ rgba_from_u32_lit_comp(0x9932ffff),
|
||||
rgba_from_u32_lit_comp(0x65ff4cff),
|
||||
rgba_from_u32_lit_comp(0xb2ccd8ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xa72a12ff),
|
||||
rgba_from_u32_lit_comp(0xffffff0c),
|
||||
rgba_from_u32_lit_comp(0x0000003f),
|
||||
};
|
||||
@@ -423,6 +423,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -459,7 +460,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -512,6 +512,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -548,7 +549,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -601,6 +601,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -637,7 +638,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -690,6 +690,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -726,7 +727,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -779,6 +779,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -815,7 +816,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -868,6 +868,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -904,7 +905,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -957,6 +957,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -993,7 +994,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -1046,6 +1046,7 @@ rgba_from_u32_lit_comp(0x0000003f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0x32b219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xb23219ff),
|
||||
rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
@@ -1082,7 +1083,6 @@ rgba_from_u32_lit_comp(0xffffff7f),
|
||||
rgba_from_u32_lit_comp(0x42474c7f),
|
||||
rgba_from_u32_lit_comp(0xffffff19),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0x3333337f),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
rgba_from_u32_lit_comp(0xe5e5e5ff),
|
||||
@@ -1148,6 +1148,7 @@ str8_lit_comp("Disabled Overlay"),
|
||||
str8_lit_comp("Default Text"),
|
||||
str8_lit_comp("Default Text (Positive)"),
|
||||
str8_lit_comp("Default Text (Negative)"),
|
||||
str8_lit_comp("Default Text (Neutral)"),
|
||||
str8_lit_comp("Default Text (Weak)"),
|
||||
str8_lit_comp("Default Background"),
|
||||
str8_lit_comp("Default Border"),
|
||||
@@ -1183,7 +1184,6 @@ str8_lit_comp("Tab Text (Inactive)"),
|
||||
str8_lit_comp("Tab Text (Inactive, Weak)"),
|
||||
str8_lit_comp("Tab Background (Inactive)"),
|
||||
str8_lit_comp("Tab Border (Inactive)"),
|
||||
str8_lit_comp("Code Background"),
|
||||
str8_lit_comp("Code Background (Negative)"),
|
||||
str8_lit_comp("Code Line Numbers"),
|
||||
str8_lit_comp("Code Line Numbers (Inactive)"),
|
||||
@@ -1237,6 +1237,7 @@ str8_lit_comp("disabled_overlay"),
|
||||
str8_lit_comp("default_text"),
|
||||
str8_lit_comp("default_text_positive"),
|
||||
str8_lit_comp("default_text_negative"),
|
||||
str8_lit_comp("default_text_neutral"),
|
||||
str8_lit_comp("default_text_weak"),
|
||||
str8_lit_comp("default_background"),
|
||||
str8_lit_comp("default_border"),
|
||||
@@ -1272,7 +1273,6 @@ str8_lit_comp("tab_inactive_text"),
|
||||
str8_lit_comp("tab_inactive_text_weak"),
|
||||
str8_lit_comp("tab_inactive_background"),
|
||||
str8_lit_comp("tab_inactive_border"),
|
||||
str8_lit_comp("code_background"),
|
||||
str8_lit_comp("code_background_negative"),
|
||||
str8_lit_comp("code_line_numbers_active"),
|
||||
str8_lit_comp("code_line_numbers_inactive"),
|
||||
|
||||
@@ -57,6 +57,7 @@ DF_ThemeColor_DisabledOverlay,
|
||||
DF_ThemeColor_DefaultText,
|
||||
DF_ThemeColor_DefaultTextPositive,
|
||||
DF_ThemeColor_DefaultTextNegative,
|
||||
DF_ThemeColor_DefaultTextNeutral,
|
||||
DF_ThemeColor_DefaultTextWeak,
|
||||
DF_ThemeColor_DefaultBackground,
|
||||
DF_ThemeColor_DefaultBorder,
|
||||
@@ -92,7 +93,6 @@ DF_ThemeColor_TabInactiveText,
|
||||
DF_ThemeColor_TabInactiveTextWeak,
|
||||
DF_ThemeColor_TabInactiveBackground,
|
||||
DF_ThemeColor_TabInactiveBorder,
|
||||
DF_ThemeColor_CodeBackground,
|
||||
DF_ThemeColor_CodeBackgroundNegative,
|
||||
DF_ThemeColor_CodeLineNumbersActive,
|
||||
DF_ThemeColor_CodeLineNumbersInactive,
|
||||
|
||||
+22
-13
@@ -87,7 +87,7 @@ d_string_from_fancy_string_list(Arena *arena, D_FancyStringList *list)
|
||||
}
|
||||
|
||||
internal D_FancyRunList
|
||||
d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, D_FancyStringList *strs)
|
||||
d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, F_RunFlags flags, D_FancyStringList *strs)
|
||||
{
|
||||
ProfBeginFunction();
|
||||
D_FancyRunList run_list = {0};
|
||||
@@ -95,7 +95,7 @@ d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, D_FancySt
|
||||
for(D_FancyStringNode *n = strs->first; n != 0; n = n->next)
|
||||
{
|
||||
D_FancyRunNode *dst_n = push_array(arena, D_FancyRunNode, 1);
|
||||
dst_n->v.run = f_push_run_from_string(arena, n->v.font, n->v.size, base_align_px, tab_size_px, 0, n->v.string);
|
||||
dst_n->v.run = f_push_run_from_string(arena, n->v.font, n->v.size, base_align_px, tab_size_px, flags, n->v.string);
|
||||
dst_n->v.color = n->v.color;
|
||||
dst_n->v.underline_thickness = n->v.underline_thickness;
|
||||
dst_n->v.strikethrough_thickness = n->v.strikethrough_thickness;
|
||||
@@ -469,9 +469,15 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, F_Run tra
|
||||
for(D_FancyRunNode *n = list->first; n != 0; n = n->next)
|
||||
{
|
||||
D_FancyRun *fr = &n->v;
|
||||
Rng1F32 pixel_range = {0};
|
||||
{
|
||||
pixel_range.min = 100000;
|
||||
pixel_range.max = 0;
|
||||
}
|
||||
F_Piece *piece_first = fr->run.pieces.v;
|
||||
F_Piece *piece_opl = piece_first + fr->run.pieces.count;
|
||||
F32 pre_advance = advance;
|
||||
F32 last_piece_end_pad = 0;
|
||||
last_color = fr->color;
|
||||
for(F_Piece *piece = piece_first;
|
||||
piece < piece_opl;
|
||||
@@ -499,14 +505,17 @@ d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 max_x, F_Run tra
|
||||
//d_rect(dst, v4f32(1, 0, 0, 1), 0, 1.f, 0.f);
|
||||
}
|
||||
advance += piece->advance;
|
||||
last_piece_end_pad = ((F32)piece->offset.x+(F32)dim_2s16(piece->subrect).x) - piece->advance;
|
||||
pixel_range.min = Min(pre_advance, pixel_range.min);
|
||||
pixel_range.max = Max(advance, pixel_range.max);
|
||||
}
|
||||
if(fr->underline_thickness > 0)
|
||||
{
|
||||
d_rect(r2f32p(p.x+pre_advance,
|
||||
d_rect(r2f32p(p.x + pixel_range.min + 1.f,
|
||||
p.y+fr->run.descent+fr->run.descent/8,
|
||||
p.x+advance + (advance-pre_advance)/8,
|
||||
p.x + pixel_range.max + last_piece_end_pad/2,
|
||||
p.y+fr->run.descent+fr->run.descent/8+fr->underline_thickness),
|
||||
fr->color, 0, 0, 1.f);
|
||||
fr->color, 0, 0, 0.8f);
|
||||
}
|
||||
if(fr->strikethrough_thickness > 0)
|
||||
{
|
||||
@@ -722,44 +731,44 @@ d_truncated_text_run(Vec2F32 p, Vec4F32 color, F32 max_x, F_Run text_run, F_Run
|
||||
}
|
||||
|
||||
internal void
|
||||
d_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, String8 string)
|
||||
d_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, String8 string)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
F_Run run = f_push_run_from_string(scratch.arena, font, size, base_align_px, tab_size_px, 0, string);
|
||||
F_Run run = f_push_run_from_string(scratch.arena, font, size, base_align_px, tab_size_px, flags, string);
|
||||
d_text_run(p, color, run);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
internal void
|
||||
d_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, char *fmt, ...)
|
||||
d_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, char *fmt, ...)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
String8 string = push_str8fv(scratch.arena, fmt, args);
|
||||
va_end(args);
|
||||
d_text(font, size, base_align_px, tab_size_px, p, color, string);
|
||||
d_text(font, size, base_align_px, tab_size_px, flags, p, color, string);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
internal void
|
||||
d_truncated_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, F32 max_x, String8 string)
|
||||
d_truncated_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, F32 max_x, String8 string)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
F_Run run = f_push_run_from_string(scratch.arena, font, size, base_align_px, tab_size_px, 0, string);
|
||||
F_Run run = f_push_run_from_string(scratch.arena, font, size, base_align_px, tab_size_px, flags, string);
|
||||
F_Run ellipses_run = f_push_run_from_string(scratch.arena, font, size, base_align_px, tab_size_px, 0, str8_lit("..."));
|
||||
d_truncated_text_run(p, color, max_x, run, ellipses_run);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
internal void
|
||||
d_truncated_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, F32 max_x, char *fmt, ...)
|
||||
d_truncated_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, F32 max_x, char *fmt, ...)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
String8 string = push_str8f(scratch.arena, fmt, args);
|
||||
d_truncated_text(font, size, base_align_px, tab_size_px, p, color, max_x, string);
|
||||
d_truncated_text(font, size, base_align_px, tab_size_px, flags, p, color, max_x, string);
|
||||
va_end(args);
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
+5
-5
@@ -111,7 +111,7 @@ internal U64 d_hash_from_string(String8 string);
|
||||
internal void d_fancy_string_list_push(Arena *arena, D_FancyStringList *list, D_FancyString *str);
|
||||
internal void d_fancy_string_list_concat_in_place(D_FancyStringList *dst, D_FancyStringList *to_push);
|
||||
internal String8 d_string_from_fancy_string_list(Arena *arena, D_FancyStringList *list);
|
||||
internal D_FancyRunList d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, D_FancyStringList *strs);
|
||||
internal D_FancyRunList d_fancy_run_list_from_fancy_string_list(Arena *arena, F32 tab_size_px, F_RunFlags flags, D_FancyStringList *strs);
|
||||
internal D_FancyRunList d_fancy_run_list_copy(Arena *arena, D_FancyRunList *src);
|
||||
|
||||
////////////////////////////////
|
||||
@@ -187,9 +187,9 @@ internal void d_truncated_fancy_run_list(Vec2F32 p, D_FancyRunList *list, F32 ma
|
||||
internal void d_truncated_fancy_run_fuzzy_matches(Vec2F32 p, D_FancyRunList *list, F32 max_x, FuzzyMatchRangeList *ranges, Vec4F32 color);
|
||||
internal void d_text_run(Vec2F32 p, Vec4F32 color, F_Run run);
|
||||
internal void d_truncated_text_run(Vec2F32 p, Vec4F32 color, F32 max_x, F_Run text_run, F_Run trailer_run);
|
||||
internal void d_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, String8 string);
|
||||
internal void d_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, char *fmt, ...);
|
||||
internal void d_truncated_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, F32 max_x, String8 string);
|
||||
internal void d_truncated_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, Vec2F32 p, Vec4F32 color, F32 max_x, char *fmt, ...);
|
||||
internal void d_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, String8 string);
|
||||
internal void d_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, char *fmt, ...);
|
||||
internal void d_truncated_text(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, F32 max_x, String8 string);
|
||||
internal void d_truncated_textf(F_Tag font, F32 size, F32 base_align_px, F32 tab_size_px, F_RunFlags flags, Vec2F32 p, Vec4F32 color, F32 max_x, char *fmt, ...);
|
||||
|
||||
#endif // DRAW_H
|
||||
|
||||
@@ -521,11 +521,12 @@ f_hash2style_from_tag_size(F_Tag tag, F32 size)
|
||||
//- rjf: tag * size -> style hash
|
||||
U64 style_hash = {0};
|
||||
{
|
||||
F64 size_f64 = size;
|
||||
U64 buffer[] =
|
||||
{
|
||||
tag.u64[0],
|
||||
tag.u64[1],
|
||||
(U64)round_f32(size),
|
||||
*(U64 *)(&size_f64),
|
||||
};
|
||||
style_hash = f_little_hash_from_string(str8((U8 *)buffer, sizeof(buffer)));
|
||||
}
|
||||
@@ -682,7 +683,7 @@ f_push_run_from_string(Arena *arena, F_Tag tag, F32 size, F32 base_align_px, F32
|
||||
}
|
||||
|
||||
// rjf: call into font provider to rasterize this substring
|
||||
FP_RasterResult raster = fp_raster(scratch.arena, font_handle, round_f32(size), FP_RasterMode_Sharp, piece_substring);
|
||||
FP_RasterResult raster = fp_raster(scratch.arena, font_handle, floor_f32(size), FP_RasterMode_Sharp, piece_substring);
|
||||
|
||||
// rjf: allocate portion of an atlas to upload the rasterization
|
||||
S16 chosen_atlas_num = 0;
|
||||
@@ -1022,10 +1023,10 @@ f_metrics_from_tag_size(F_Tag tag, F32 size)
|
||||
FP_Metrics metrics = f_fp_metrics_from_tag(tag);
|
||||
F_Metrics result = {0};
|
||||
{
|
||||
result.ascent = size * metrics.ascent / metrics.design_units_per_em;
|
||||
result.descent = size * metrics.descent / metrics.design_units_per_em;
|
||||
result.line_gap = size * metrics.line_gap / metrics.design_units_per_em;
|
||||
result.capital_height = size * metrics.capital_height / metrics.design_units_per_em;
|
||||
result.ascent = floor_f32(size) * metrics.ascent / metrics.design_units_per_em;
|
||||
result.descent = floor_f32(size) * metrics.descent / metrics.design_units_per_em;
|
||||
result.line_gap = floor_f32(size) * metrics.line_gap / metrics.design_units_per_em;
|
||||
result.capital_height = floor_f32(size) * metrics.capital_height / metrics.design_units_per_em;
|
||||
}
|
||||
ProfEnd();
|
||||
return result;
|
||||
|
||||
@@ -414,7 +414,7 @@ fp_raster(Arena *arena, FP_Handle font_handle, F32 size, FP_RasterMode mode, Str
|
||||
// rjf: fill basics
|
||||
result.atlas_dim = atlas_dim;
|
||||
result.atlas = push_array_no_zero(arena, U8, atlas_dim.x*atlas_dim.y*4);
|
||||
result.advance = advance;
|
||||
result.advance = floor_f32(advance);
|
||||
result.height = bounding_box.bottom + 1.f;
|
||||
|
||||
// rjf: fill atlas
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define BUILD_VERSION_MAJOR 0
|
||||
#define BUILD_VERSION_MINOR 9
|
||||
#define BUILD_VERSION_PATCH 10
|
||||
#define BUILD_VERSION_PATCH 11
|
||||
#define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||
#define BUILD_TITLE "The RAD Debugger"
|
||||
#define OS_FEATURE_GRAPHICAL 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define BUILD_VERSION_MAJOR 0
|
||||
#define BUILD_VERSION_MINOR 9
|
||||
#define BUILD_VERSION_PATCH 10
|
||||
#define BUILD_VERSION_PATCH 11
|
||||
#define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||
#define BUILD_TITLE "rdi_breakpad_from_pdb"
|
||||
#define BUILD_CONSOLE_INTERFACE 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define BUILD_VERSION_MAJOR 0
|
||||
#define BUILD_VERSION_MINOR 9
|
||||
#define BUILD_VERSION_PATCH 10
|
||||
#define BUILD_VERSION_PATCH 11
|
||||
#define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||
#define BUILD_TITLE "rdi_dump"
|
||||
#define BUILD_CONSOLE_INTERFACE 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define BUILD_VERSION_MAJOR 0
|
||||
#define BUILD_VERSION_MINOR 9
|
||||
#define BUILD_VERSION_PATCH 10
|
||||
#define BUILD_VERSION_PATCH 11
|
||||
#define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||
#define BUILD_TITLE "rdi_from_dwarf"
|
||||
#define BUILD_CONSOLE_INTERFACE 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define BUILD_VERSION_MAJOR 0
|
||||
#define BUILD_VERSION_MINOR 9
|
||||
#define BUILD_VERSION_PATCH 10
|
||||
#define BUILD_VERSION_PATCH 11
|
||||
#define BUILD_RELEASE_PHASE_STRING_LITERAL "ALPHA"
|
||||
#define BUILD_TITLE "rdi_from_pdb"
|
||||
#define BUILD_CONSOLE_INTERFACE 1
|
||||
@@ -64,7 +64,7 @@ entry_point(CmdLine *cmdline)
|
||||
{
|
||||
fprintf(stderr, "--- rdi_from_pdb --------------------------------------------------------------\n\n");
|
||||
|
||||
fprintf(stderr, "This utility converts debug information from PDBs into the RAD Debug Info.\n");
|
||||
fprintf(stderr, "This utility converts debug information from PDBs into the RAD Debug Info\n");
|
||||
fprintf(stderr, "format. The following arguments are accepted:\n\n");
|
||||
|
||||
fprintf(stderr, "--exe:<path> [optional] Specifies the path of the executable file for which the\n");
|
||||
|
||||
@@ -1114,7 +1114,7 @@ tg_data_members_from_graph_rdi_key(Arena *arena, TG_Graph *graph, RDI_Parsed *rd
|
||||
padding_member->kind = TG_MemberKind_Padding;
|
||||
padding_member->type_key = tg_cons_type_make(graph, TG_Kind_Array, tg_key_basic(TG_Kind_U8), n->size);
|
||||
padding_member->off = n->off;
|
||||
padding_member->name = str8_lit("[padding]");
|
||||
padding_member->name = str8_lit("padding");
|
||||
padding_idx += 1;
|
||||
}
|
||||
members = new_members;
|
||||
|
||||
@@ -9,11 +9,25 @@ ui_spacer(UI_Size size)
|
||||
{
|
||||
UI_Box *parent = ui_top_parent();
|
||||
ui_set_next_pref_size(parent->child_layout_axis, size);
|
||||
UI_Box *box = ui_build_box_from_string(0, str8_lit(""));
|
||||
UI_Box *box = ui_build_box_from_key(0, ui_key_zero());
|
||||
UI_Signal interact = ui_signal_from_box(box);
|
||||
return interact;
|
||||
}
|
||||
|
||||
internal void
|
||||
ui_divider(UI_Size size)
|
||||
{
|
||||
UI_Box *parent = ui_top_parent();
|
||||
ui_set_next_pref_size(parent->child_layout_axis, size);
|
||||
ui_set_next_child_layout_axis(parent->child_layout_axis);
|
||||
UI_Box *box = ui_build_box_from_key(0, ui_key_zero());
|
||||
UI_Parent(box) UI_PrefSize(parent->child_layout_axis, ui_pct(1, 0))
|
||||
{
|
||||
ui_build_box_from_key(UI_BoxFlag_DrawSideBottom, ui_key_zero());
|
||||
ui_build_box_from_key(0, ui_key_zero());
|
||||
}
|
||||
}
|
||||
|
||||
internal UI_Signal
|
||||
ui_label(String8 string)
|
||||
{
|
||||
|
||||
@@ -69,6 +69,7 @@ struct UI_ScrollListSignal
|
||||
//~ rjf: Basic Widgets
|
||||
|
||||
internal UI_Signal ui_spacer(UI_Size size);
|
||||
internal void ui_divider(UI_Size size);
|
||||
internal UI_Signal ui_label(String8 string);
|
||||
internal UI_Signal ui_labelf(char *fmt, ...);
|
||||
internal void ui_label_multiline(F32 max, String8 string);
|
||||
|
||||
+25
-37
@@ -963,26 +963,6 @@ ui_begin_build(OS_Handle window, UI_EventList *events, UI_IconInfo *icon_info, F
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: some child has the active focus -> detect events which will cause an external focus commit
|
||||
// (e.g. clicking outside of a line edit)
|
||||
if(!ui_key_match(ui_key_zero(), nav_root->default_nav_focus_active_key))
|
||||
{
|
||||
UI_Box *active_box = ui_box_from_key(nav_root->default_nav_focus_active_key);
|
||||
if(!ui_box_is_nil(active_box))
|
||||
{
|
||||
for(UI_EventNode *n = events->first; n != 0; n = n->next)
|
||||
{
|
||||
UI_Event *event = &n->v;
|
||||
if(event->kind == UI_EventKind_Press &&
|
||||
event->key == OS_Key_LeftMouseButton &&
|
||||
!contains_2f32(active_box->rect, ui_mouse()))
|
||||
{
|
||||
ui_state->external_focus_commit = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ui_state->default_nav_root_key = ui_key_zero();
|
||||
@@ -1822,11 +1802,11 @@ ui_tooltip_begin(void)
|
||||
UI_PrefHeight(ui_children_sum(1))
|
||||
UI_CornerRadius(ui_top_font_size()*0.25f)
|
||||
ui_column_begin();
|
||||
UI_PrefWidth(ui_px(0, 1)) ui_spacer(ui_em(0.5f, 1.f));
|
||||
UI_PrefWidth(ui_px(0, 1)) ui_spacer(ui_em(1.f, 1.f));
|
||||
UI_PrefWidth(ui_children_sum(1))
|
||||
UI_PrefHeight(ui_children_sum(1))
|
||||
ui_row_begin();
|
||||
UI_PrefHeight(ui_px(0, 1)) ui_spacer(ui_em(0.5f, 1.f));
|
||||
UI_PrefHeight(ui_px(0, 1)) ui_spacer(ui_em(1.f, 1.f));
|
||||
UI_PrefWidth(ui_children_sum(1))
|
||||
UI_PrefHeight(ui_children_sum(1))
|
||||
ui_column_begin();
|
||||
@@ -1842,9 +1822,9 @@ ui_tooltip_end(void)
|
||||
ui_pop_pref_width();
|
||||
ui_pop_pref_height();
|
||||
ui_column_end();
|
||||
UI_PrefHeight(ui_px(0, 1)) ui_spacer(ui_em(0.5f, 1.f));
|
||||
UI_PrefHeight(ui_px(0, 1)) ui_spacer(ui_em(1.f, 1.f));
|
||||
ui_row_end();
|
||||
UI_PrefWidth(ui_px(0, 1)) ui_spacer(ui_em(0.5f, 1.f));
|
||||
UI_PrefWidth(ui_px(0, 1)) ui_spacer(ui_em(1.f, 1.f));
|
||||
ui_column_end();
|
||||
ui_tooltip_end_base();
|
||||
}
|
||||
@@ -1879,8 +1859,12 @@ ui_begin_ctx_menu(UI_Key key)
|
||||
{
|
||||
ui_push_parent(ui_root_from_state(ui_state));
|
||||
ui_push_parent(ui_state->ctx_menu_root);
|
||||
B32 result = ui_key_match(key, ui_state->ctx_menu_key) && ui_state->ctx_menu_open;
|
||||
if(result != 0)
|
||||
ui_push_pref_width(ui_bottom_pref_width());
|
||||
ui_push_pref_height(ui_bottom_pref_height());
|
||||
ui_push_focus_hot(UI_FocusKind_Root);
|
||||
ui_push_focus_active(UI_FocusKind_Root);
|
||||
B32 is_open = ui_key_match(key, ui_state->ctx_menu_key) && ui_state->ctx_menu_open;
|
||||
if(is_open != 0)
|
||||
{
|
||||
ui_state->ctx_menu_touched_this_frame = 1;
|
||||
ui_state->ctx_menu_root->flags |= UI_BoxFlag_RoundChildrenByParent;
|
||||
@@ -1892,17 +1876,20 @@ ui_begin_ctx_menu(UI_Key key)
|
||||
ui_state->ctx_menu_root->corner_radii[Corner_00] = ui_state->ctx_menu_root->corner_radii[Corner_01] = ui_state->ctx_menu_root->corner_radii[Corner_10] = ui_state->ctx_menu_root->corner_radii[Corner_11] = ui_top_font_size()*0.25f;
|
||||
ui_state->ctx_menu_root->palette = ui_top_palette();
|
||||
ui_state->ctx_menu_root->blur_size = ui_top_blur_size();
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
ui_push_pref_width(ui_bottom_pref_width());
|
||||
ui_push_pref_height(ui_bottom_pref_height());
|
||||
ui_push_focus_hot(UI_FocusKind_Root);
|
||||
ui_push_focus_active(UI_FocusKind_Root);
|
||||
return result;
|
||||
ui_state->is_in_open_ctx_menu = is_open;
|
||||
return is_open;
|
||||
}
|
||||
|
||||
internal void
|
||||
ui_end_ctx_menu(void)
|
||||
{
|
||||
if(ui_state->is_in_open_ctx_menu)
|
||||
{
|
||||
ui_state->is_in_open_ctx_menu = 0;
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
ui_pop_focus_active();
|
||||
ui_pop_focus_hot();
|
||||
ui_pop_pref_width();
|
||||
@@ -2207,6 +2194,7 @@ ui_build_box_from_key(UI_BoxFlags flags, UI_Key key)
|
||||
box->font = ui_state->font_stack.top->v;
|
||||
box->font_size = ui_state->font_size_stack.top->v;
|
||||
box->tab_size = ui_state->tab_size_stack.top->v;
|
||||
box->run_flags = ui_state->run_flags_stack.top->v;
|
||||
box->corner_radii[Corner_00] = ui_state->corner_radius_00_stack.top->v;
|
||||
box->corner_radii[Corner_01] = ui_state->corner_radius_01_stack.top->v;
|
||||
box->corner_radii[Corner_10] = ui_state->corner_radius_10_stack.top->v;
|
||||
@@ -2296,7 +2284,7 @@ ui_box_equip_display_string(UI_Box *box, String8 string)
|
||||
String8 display_string = ui_box_display_string(box);
|
||||
D_FancyStringNode fancy_string_n = {0, {box->font, display_string, box->palette->colors[text_color_code], box->font_size, 0, 0}};
|
||||
D_FancyStringList fancy_strings = {&fancy_string_n, &fancy_string_n, 1};
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, &fancy_strings);
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->run_flags, &fancy_strings);
|
||||
}
|
||||
else if(box->flags & UI_BoxFlag_DrawText && box->flags & UI_BoxFlag_DrawTextFastpathCodepoint && box->fastpath_codepoint != 0)
|
||||
{
|
||||
@@ -2308,16 +2296,16 @@ ui_box_equip_display_string(UI_Box *box, String8 string)
|
||||
if(fpcp_pos < display_string.size)
|
||||
{
|
||||
D_FancyStringNode pst_fancy_string_n = {0, {box->font, str8_skip(display_string, fpcp_pos+fpcp.size), box->palette->colors[text_color_code], box->font_size, 0, 0}};
|
||||
D_FancyStringNode cdp_fancy_string_n = {&pst_fancy_string_n, {box->font, str8_substr(display_string, r1u64(fpcp_pos, fpcp_pos+fpcp.size)), box->palette->colors[text_color_code], box->font_size, 4.f, 0}};
|
||||
D_FancyStringNode cdp_fancy_string_n = {&pst_fancy_string_n, {box->font, str8_substr(display_string, r1u64(fpcp_pos, fpcp_pos+fpcp.size)), box->palette->colors[text_color_code], box->font_size, 3.f, 0}};
|
||||
D_FancyStringNode pre_fancy_string_n = {&cdp_fancy_string_n, {box->font, str8_prefix(display_string, fpcp_pos), box->palette->colors[text_color_code], box->font_size, 0, 0}};
|
||||
D_FancyStringList fancy_strings = {&pre_fancy_string_n, &pst_fancy_string_n, 3};
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, &fancy_strings);
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->run_flags, &fancy_strings);
|
||||
}
|
||||
else
|
||||
{
|
||||
D_FancyStringNode fancy_string_n = {0, {box->font, display_string, box->palette->colors[UI_ColorCode_Text], box->font_size, 0, 0}};
|
||||
D_FancyStringList fancy_strings = {&fancy_string_n, &fancy_string_n, 1};
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, &fancy_strings);
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->run_flags, &fancy_strings);
|
||||
}
|
||||
scratch_end(scratch);
|
||||
}
|
||||
@@ -2325,11 +2313,11 @@ ui_box_equip_display_string(UI_Box *box, String8 string)
|
||||
}
|
||||
|
||||
internal void
|
||||
ui_box_equip_display_fancy_strings(UI_Box *box, F32 tab_size, D_FancyStringList *strings)
|
||||
ui_box_equip_display_fancy_strings(UI_Box *box, D_FancyStringList *strings)
|
||||
{
|
||||
box->flags |= UI_BoxFlag_HasDisplayString;
|
||||
box->string = d_string_from_fancy_string_list(ui_build_arena(), strings);
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), tab_size, strings);
|
||||
box->display_string_runs = d_fancy_run_list_from_fancy_string_list(ui_build_arena(), box->tab_size, box->run_flags, strings);
|
||||
}
|
||||
|
||||
internal inline void
|
||||
|
||||
+5
-2
@@ -373,6 +373,7 @@ struct UI_Box
|
||||
F_Tag font;
|
||||
F32 font_size;
|
||||
F32 tab_size;
|
||||
F_RunFlags run_flags;
|
||||
F32 corner_radii[Corner_COUNT];
|
||||
F32 blur_size;
|
||||
F32 transparency;
|
||||
@@ -548,6 +549,9 @@ struct UI_State
|
||||
U64 box_table_size;
|
||||
UI_BoxHashSlot *box_table;
|
||||
|
||||
//- rjf: build state machine state
|
||||
B32 is_in_open_ctx_menu;
|
||||
|
||||
//- rjf: build phase output
|
||||
UI_Box *root;
|
||||
UI_Box *tooltip_root;
|
||||
@@ -564,7 +568,6 @@ struct UI_State
|
||||
UI_EventList *events;
|
||||
Vec2F32 mouse;
|
||||
F32 animation_dt;
|
||||
B32 external_focus_commit;
|
||||
|
||||
//- rjf: user interaction state
|
||||
UI_Key hot_box_key;
|
||||
@@ -773,7 +776,7 @@ internal UI_Box * ui_build_box_from_stringf(UI_BoxFlags flags, char *fm
|
||||
|
||||
//- rjf: box node equipment
|
||||
internal inline void ui_box_equip_display_string(UI_Box *box, String8 string);
|
||||
internal inline void ui_box_equip_display_fancy_strings(UI_Box *box, F32 tab_size, D_FancyStringList *strings);
|
||||
internal inline void ui_box_equip_display_fancy_strings(UI_Box *box, D_FancyStringList *strings);
|
||||
internal inline void ui_box_equip_display_string_fancy_runs(UI_Box *box, String8 string, D_FancyRunList *runs);
|
||||
internal inline void ui_box_equip_fuzzy_match_ranges(UI_Box *box, FuzzyMatchRangeList *matches);
|
||||
internal inline void ui_box_equip_draw_bucket(UI_Box *box, D_Bucket *bucket);
|
||||
|
||||
Reference in New Issue
Block a user