mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-14 18:20:11 -08:00
checkpoint on final pre-release pass over 'fancy rows' (combined line edit, toggler, slider, etc. widget), plug autocompletion in for theme selection lister
This commit is contained in:
1 parent
9b3a2c2428
commit
19acf2cdee
8 files changed
+156
-33
No files matched your search
@@ -400,8 +400,8 @@ RD_VocabInfo rd_vocab_info_table[334] =
|
||||
|
||||
RD_NameSchemaInfo rd_name_schema_info_table[24] =
|
||||
{
|
||||
{str8_lit_comp("user"), str8_lit_comp("@expand_commands(edit_user_theme) x:\n{\n //- rjf: animations\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n\n //- rjf: fonts\n @display_name('UI Font') @description(\"The name of, or path to, the font used when displaying non-code UI elements.\")\n 'main_font': string,\n @display_name('Code Font') @description(\"The name of, or path to, the font used when displaying code.\")\n 'code_font': string,\n\n //- rjf: theme\n @display_name('User Theme') 'theme': string,\n @no_expand @display_name('User Theme') @description(\"The user's theme, which describes all colors used throughout the UI.\")\n 'theme_colors': query,\n\n //- rjf: autocompletion\n @display_name('Autocompletion Lister') @description(\"Enables the autocompletion lister while typing expressions.\") @default(1)\n 'autocompletion_lister': bool,\n\n //- rjf: thread & breakpoint decorations\n @default(1) @display_name('Thread Lines') @description(\"Controls whether or not a long horizontal line is drawn before the next line or instruction that the selected thread will execute in source and disassembly views.\")\n 'thread_lines': bool,\n @default(1) @display_name('Thread Glow') @description(\"Controls whether or not a glowing effect is drawn on the selected thread in source and disassembly views.\")\n 'thread_glow': bool,\n @default(1) @display_name('Breakpoint Lines') @description(\"Controls whether or not a long horizontal line is drawn before the line or instruction at which a breakpoint is placed, in source and disassembly views.\")\n 'breakpoint_lines': bool,\n @default(1) @display_name('Breakpoint Glow') @description(\"Controls whether or not a glowing effect is drawn on breakpoints in source and disassembly views.\")\n 'breakpoint_glow': bool,\n\n //- rjf: occluding background settings\n @default(0) @display_name('Opaque Backgrounds') @description(\"Controls whether or not all floating background colors are forced to be fully opaque.\")\n 'opaque_backgrounds': bool,\n @default(1) @display_name('Background Blur') @description(\"Controls whether or not occluded regions behind floating elements are blurred.\")\n 'background_blur': bool,\n\n //- rjf: appearance settings\n @default(1) @display_name('Drop Shadows') @description(\"Controls whether or not drop shadows are drawn.\")\n 'drop_shadows': bool,\n @default(1.f) @display_name('Rounded Corner Amount') @description(\"Controls the degree to which UI corners are rounded.\")\n 'rounded_corner_amount': @range[0, 1] f32,\n\n //- rjf: code formatting settings\n @default(2) @display_name('User Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: windows style menu bar\n @default(1) @display_name('Focus Menu Bar With Alt') @description(\"Mimics standard Windows behavior of focusing the menu bar using the Alt key.\")\n 'focus_menu_bar_with_alt': bool,\n}\n")},
|
||||
{str8_lit_comp("project"), str8_lit_comp("@expand_commands(edit_project_theme) x:\n{\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: visualizers\n @display_name('Use Default C++ STL Type Visualizers') @description(\"Enables the built-in type views for C++ STL types.\")\n @default(1) use_default_stl_type_views: bool,\n @display_name('Use Default Unreal Engine Type Visualizers') @description(\"Enables the built-in type views for Unreal Engine types.\")\n @default(1) use_default_ue_type_views: bool,\n\n //- rjf: theme\n @display_name('Project Theme') 'theme': string,\n @no_expand @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme_colors': query,\n\n //- rjf: exception settings\n @default(1) @display_name(\"Break On Win32 Control-C Exceptions\") @description(\"Code: 0x40010005\")\n win32_ctrl_c: bool;\n @default(1) @display_name(\"Break On Win32 Control-Break Exceptions\") @description(\"Code: 0x40010008\")\n win32_ctrl_break: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Originate Error Exceptions\") @description(\"Code: 0x40080201\")\n win32_win_rt_originate_error: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Transform Error Exceptions\") @description(\"Code: 0x40080202\")\n win32_win_rt_transform_error: bool;\n @default(0) @display_name(\"Break On Win32 RPC Call Cancelled Exceptions\") @description(\"Code: 0x0000071a\")\n win32_rpc_call_cancelled: bool;\n @default(0) @display_name(\"Break On Win32 Data Type Misalignment Exceptions\") @description(\"Code: 0x80000002\")\n win32_datatype_misalignment: bool;\n @default(1) @display_name(\"Break On Win32 Access Violation Exceptions\") @description(\"Code: 0xc0000005\")\n win32_access_violation: bool;\n @default(0) @display_name(\"Break On Win32 In Page Error Exceptions\") @description(\"Code: 0xc0000006\")\n win32_in_page_error: bool;\n @default(1) @display_name(\"Break On Win32 Invalid Handle Specified Exceptions\") @description(\"Code: 0xc0000008\")\n win32_invalid_handle: bool;\n @default(0) @display_name(\"Break On Win32 Not Enough Quota Exceptions\") @description(\"Code: 0xc0000017\")\n win32_not_enough_quota: bool;\n @default(0) @display_name(\"Break On Win32 Illegal Instruction Exceptions\") @description(\"Code: 0xc000001d\")\n win32_illegal_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Cannot Continue From Exception Exceptions\") @description(\"Code: 0xc0000025\")\n win32_cannot_continue_exception: bool;\n @default(0) @display_name(\"Break On Win32 Invalid Exception Disposition Returned By Handler Exceptions\") @description(\"Code: 0xc0000026\")\n win32_invalid_exception_disposition: bool;\n @default(0) @display_name(\"Break On Win32 Array Bounds Exceeded Exceptions\") @description(\"Code: 0xc000008c\")\n win32_array_bounds_exceeded: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Denormal Operand Exceptions\") @description(\"Code: 0xc000008d\")\n win32_floating_point_denormal_operand: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Division By Zero Exceptions\") @description(\"Code: 0xc000008e\")\n win32_floating_point_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Inexact Result Exceptions\") @description(\"Code: 0xc000008f\")\n win32_floating_point_inexact_result: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Invalid Operation Exceptions\") @description(\"Code: 0xc0000090\")\n win32_floating_point_invalid_operation: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Overflow Exceptions\") @description(\"Code: 0xc0000091\")\n win32_floating_point_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Stack Check Exceptions\") @description(\"Code: 0xc0000092\")\n win32_floating_point_stack_check: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Underflow Exceptions\") @description(\"Code: 0xc0000093\")\n win32_floating_point_underflow: bool;\n @default(0) @display_name(\"Break On Win32 Integer Division By Zero Exceptions\") @description(\"Code: 0xc0000094\")\n win32_integer_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Integer Overflow Exceptions\") @description(\"Code: 0xc0000095\")\n win32_integer_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Privileged Instruction Exceptions\") @description(\"Code: 0xc0000096\")\n win32_privileged_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Stack Overflow Exceptions\") @description(\"Code: 0xc00000fd\")\n win32_stack_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Unable To Locate DLL Exceptions\") @description(\"Code: 0xc0000135\")\n win32_unable_to_locate_dll: bool;\n @default(0) @display_name(\"Break On Win32 Ordinal Not Found Exceptions\") @Line truncated
|
||||
{str8_lit_comp("user"), str8_lit_comp("@expand_commands(edit_user_theme) x:\n{\n //- rjf: animations\n @default(1) 'hover_animations': bool,\n @default(1) 'press_animations': bool,\n @default(0) 'focus_animations': bool,\n @default(1) 'tooltip_animations': bool,\n @default(1) 'menu_animations': bool,\n @default(1) 'scrolling_animations': bool,\n\n //- rjf: fonts\n @display_name('UI Font') @description(\"The name of, or path to, the font used when displaying non-code UI elements.\")\n 'main_font': string,\n @display_name('Code Font') @description(\"The name of, or path to, the font used when displaying code.\")\n 'code_font': string,\n\n //- rjf: theme\n @default(\"Default (Dark)\") @display_name('User Theme')\n @description(\"The user's theme, which describes all colors used throughout the UI.\")\n 'theme': string,\n @no_expand @display_name('User Theme')\n 'theme_colors': query,\n\n //- rjf: autocompletion\n @display_name('Autocompletion Lister') @description(\"Enables the autocompletion lister while typing expressions.\") @default(1)\n 'autocompletion_lister': bool,\n\n //- rjf: thread & breakpoint decorations\n @default(1) @display_name('Thread Lines') @description(\"Controls whether or not a long horizontal line is drawn before the next line or instruction that the selected thread will execute in source and disassembly views.\")\n 'thread_lines': bool,\n @default(1) @display_name('Thread Glow') @description(\"Controls whether or not a glowing effect is drawn on the selected thread in source and disassembly views.\")\n 'thread_glow': bool,\n @default(1) @display_name('Breakpoint Lines') @description(\"Controls whether or not a long horizontal line is drawn before the line or instruction at which a breakpoint is placed, in source and disassembly views.\")\n 'breakpoint_lines': bool,\n @default(1) @display_name('Breakpoint Glow') @description(\"Controls whether or not a glowing effect is drawn on breakpoints in source and disassembly views.\")\n 'breakpoint_glow': bool,\n\n //- rjf: occluding background settings\n @default(0) @display_name('Opaque Backgrounds') @description(\"Controls whether or not all floating background colors are forced to be fully opaque.\")\n 'opaque_backgrounds': bool,\n @default(1) @display_name('Background Blur') @description(\"Controls whether or not occluded regions behind floating elements are blurred.\")\n 'background_blur': bool,\n\n //- rjf: appearance settings\n @default(1) @display_name('Drop Shadows') @description(\"Controls whether or not drop shadows are drawn.\")\n 'drop_shadows': bool,\n @default(1.f) @display_name('Rounded Corner Amount') @description(\"Controls the degree to which UI corners are rounded.\")\n 'rounded_corner_amount': @range[0, 1] f32,\n\n //- rjf: code formatting settings\n @default(2) @display_name('User Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: windows style menu bar\n @default(1) @display_name('Focus Menu Bar With Alt') @description(\"Mimics standard Windows behavior of focusing the menu bar using the Alt key.\")\n 'focus_menu_bar_with_alt': bool,\n}\n")},
|
||||
{str8_lit_comp("project"), str8_lit_comp("@expand_commands(edit_project_theme) x:\n{\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\n\n //- rjf: visualizers\n @display_name('Use Default C++ STL Type Visualizers') @description(\"Enables the built-in type views for C++ STL types.\")\n @default(1) use_default_stl_type_views: bool,\n @display_name('Use Default Unreal Engine Type Visualizers') @description(\"Enables the built-in type views for Unreal Engine types.\")\n @default(1) use_default_ue_type_views: bool,\n\n //- rjf: theme\n @default(\"None\") @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme': string,\n @no_expand @display_name('Project Theme') @description(\"The project's theme, which describes all colors used throughout the UI, and can override the user's theme.\")\n 'theme_colors': query,\n\n //- rjf: exception settings\n @default(1) @display_name(\"Break On Win32 Control-C Exceptions\") @description(\"Code: 0x40010005\")\n win32_ctrl_c: bool;\n @default(1) @display_name(\"Break On Win32 Control-Break Exceptions\") @description(\"Code: 0x40010008\")\n win32_ctrl_break: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Originate Error Exceptions\") @description(\"Code: 0x40080201\")\n win32_win_rt_originate_error: bool;\n @default(0) @display_name(\"Break On Win32 WinRT Transform Error Exceptions\") @description(\"Code: 0x40080202\")\n win32_win_rt_transform_error: bool;\n @default(0) @display_name(\"Break On Win32 RPC Call Cancelled Exceptions\") @description(\"Code: 0x0000071a\")\n win32_rpc_call_cancelled: bool;\n @default(0) @display_name(\"Break On Win32 Data Type Misalignment Exceptions\") @description(\"Code: 0x80000002\")\n win32_datatype_misalignment: bool;\n @default(1) @display_name(\"Break On Win32 Access Violation Exceptions\") @description(\"Code: 0xc0000005\")\n win32_access_violation: bool;\n @default(0) @display_name(\"Break On Win32 In Page Error Exceptions\") @description(\"Code: 0xc0000006\")\n win32_in_page_error: bool;\n @default(1) @display_name(\"Break On Win32 Invalid Handle Specified Exceptions\") @description(\"Code: 0xc0000008\")\n win32_invalid_handle: bool;\n @default(0) @display_name(\"Break On Win32 Not Enough Quota Exceptions\") @description(\"Code: 0xc0000017\")\n win32_not_enough_quota: bool;\n @default(0) @display_name(\"Break On Win32 Illegal Instruction Exceptions\") @description(\"Code: 0xc000001d\")\n win32_illegal_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Cannot Continue From Exception Exceptions\") @description(\"Code: 0xc0000025\")\n win32_cannot_continue_exception: bool;\n @default(0) @display_name(\"Break On Win32 Invalid Exception Disposition Returned By Handler Exceptions\") @description(\"Code: 0xc0000026\")\n win32_invalid_exception_disposition: bool;\n @default(0) @display_name(\"Break On Win32 Array Bounds Exceeded Exceptions\") @description(\"Code: 0xc000008c\")\n win32_array_bounds_exceeded: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Denormal Operand Exceptions\") @description(\"Code: 0xc000008d\")\n win32_floating_point_denormal_operand: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Division By Zero Exceptions\") @description(\"Code: 0xc000008e\")\n win32_floating_point_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Inexact Result Exceptions\") @description(\"Code: 0xc000008f\")\n win32_floating_point_inexact_result: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Invalid Operation Exceptions\") @description(\"Code: 0xc0000090\")\n win32_floating_point_invalid_operation: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Overflow Exceptions\") @description(\"Code: 0xc0000091\")\n win32_floating_point_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Stack Check Exceptions\") @description(\"Code: 0xc0000092\")\n win32_floating_point_stack_check: bool;\n @default(0) @display_name(\"Break On Win32 Floating-Point Underflow Exceptions\") @description(\"Code: 0xc0000093\")\n win32_floating_point_underflow: bool;\n @default(0) @display_name(\"Break On Win32 Integer Division By Zero Exceptions\") @description(\"Code: 0xc0000094\")\n win32_integer_division_by_zero: bool;\n @default(0) @display_name(\"Break On Win32 Integer Overflow Exceptions\") @description(\"Code: 0xc0000095\")\n win32_integer_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Privileged Instruction Exceptions\") @description(\"Code: 0xc0000096\")\n win32_privileged_instruction: bool;\n @default(0) @display_name(\"Break On Win32 Stack Overflow Exceptions\") @description(\"Code: 0xc00000fd\")\n win32_stack_overflow: bool;\n @default(0) @display_name(\"Break On Win32 Unable To Locate DLL Exceptions\") @desLine truncated
|
||||
{str8_lit_comp("theme_color"), str8_lit_comp("@collection_commands(add_theme_color, fork_theme, save_theme)\n@row_commands(duplicate_cfg, remove_cfg)\nx:\n{\n @display_name('Tags') tags: string,\n @display_name('Value') value: @color @hex u32,\n}\n")},
|
||||
{str8_lit_comp("window"), str8_lit_comp("x:\n{\n //- rjf: text rasterization settings\n @default(1) @display_name('Smooth UI Text') @description(\"Controls whether or not UI text is fully anti-aliased, for a smoother appearance.\")\n 'smooth_ui_text': bool,\n @default(1) @display_name('Hint UI Text') @description(\"Controls whether or not UI text is hinted, for better text readability at small sizes.\")\n 'hint_ui_text': bool,\n @default(0) @display_name('Smooth Code Text') @description(\"Controls whether or not code text is fully anti-aliased, for a smoother appearance.\")\n 'smooth_code_text': bool,\n @default(1) @display_name('Hint Code Text') @description(\"Controls whether or not code text is hinted, for better text readability at small sizes.\")\n 'hint_code_text': bool,\n @default(11) @display_name('Window Font Size') @description(\"Controls the window's default font size. Does not apply to tabs with their own font size set.\")\n 'font_size': @range[6, 72] u64,\n\n //- rjf: size settings\n @default(3.f) @display_name('Window Row Height') @description(\"Controls the window's default row height, in multiples of the font size. Does not apply to tabs with their own row height set.\")\n 'row_height': @range[1.75f, 5.f] f32,\n @default(3.f) @description(\"Controls the height of tabs, in multiples of the font size.\")\n 'tab_height': @range[1.75f, 5.f] f32,\n\n //- rjf: theme settings\n @default(1) @display_name('Use Project Theme') @description(\"Prefer using the project theme for this window, if any. If off, only the user's theme settings will be used.\")\n 'use_project_theme': bool,\n}\n")},
|
||||
{str8_lit_comp("tab"), str8_lit_comp("@row_commands(@file copy_tab_full_path, @file show_file_in_explorer, duplicate_tab, close_tab)\nx:\n{\n @default(11) @display_name('Tab Font Size') @description(\"Controls the tab's font size.\")\n 'font_size': @range[6, 72] u64,\n}\n")},
|
||||
@@ -940,9 +940,8 @@ str8_lit_comp("code_line_numbers"),
|
||||
str8_lit_comp("code_line_numbers_selected"),
|
||||
};
|
||||
|
||||
String8 rd_theme_preset_display_string_table[11] =
|
||||
String8 rd_theme_preset_display_string_table[10] =
|
||||
{
|
||||
str8_lit_comp("None"),
|
||||
str8_lit_comp("Default (Dark)"),
|
||||
str8_lit_comp("Default (Light)"),
|
||||
str8_lit_comp("VS (Dark)"),
|
||||
@@ -955,9 +954,8 @@ str8_lit_comp("Grove"),
|
||||
str8_lit_comp("Far Manager"),
|
||||
};
|
||||
|
||||
String8 rd_theme_preset_code_string_table[11] =
|
||||
String8 rd_theme_preset_code_string_table[10] =
|
||||
{
|
||||
str8_lit_comp("none"),
|
||||
str8_lit_comp("default_dark"),
|
||||
str8_lit_comp("default_light"),
|
||||
str8_lit_comp("vs_dark"),
|
||||
@@ -970,9 +968,8 @@ str8_lit_comp("grove"),
|
||||
str8_lit_comp("far_manager"),
|
||||
};
|
||||
|
||||
String8 rd_theme_preset_cfg_string_table[11] =
|
||||
String8 rd_theme_preset_cfg_string_table[10] =
|
||||
{
|
||||
str8_lit_comp(""),
|
||||
str8_lit_comp("theme:\n{\n theme_color: {tags:\"background\", value: 0x1b1b1bff }\n theme_color: {tags:\"alt background\", value: 0x222222ff }\n theme_color: {tags:\"pop background\", value: 0x355b6eff }\n theme_color: {tags:\"fresh background\", value: 0x31393dff }\n theme_color: {tags:\"match background\", value: 0x31393dff }\n theme_color: {tags:\"border\", value: 0x404040ff }\n theme_color: {tags:\"text\", value: 0xe5e5e5ff }\n theme_color: {tags:\"weak text\", value: 0xa4a4a4ff }\n theme_color: {tags:\"good text\", value: 0x32a852ff }\n theme_color: {tags:\"neutral text\", value: 0x3a90bbff }\n theme_color: {tags:\"bad text\", value: 0xcf5242ff }\n theme_color: {tags:\"hover\", value: 0xffffffff }\n theme_color: {tags:\"focus overlay\", value: 0xfda20012 }\n theme_color: {tags:\"focus border\", value: 0xfda200ff }\n theme_color: {tags:\"cursor\", value: 0x8aff00ff }\n theme_color: {tags:\"selection\", value: 0x99ccff0f }\n theme_color: {tags:\"inactive background\", value: 0x0000002f }\n theme_color: {tags:\"drop_shadow\", value: 0x0000007f }\n theme_color: {tags:\"good_pop background\", value: 0x2c5b36ff }\n theme_color: {tags:\"good_pop border\", value: 0x568761ff }\n theme_color: {tags:\"good_pop hover\", value: 0xe3f5d3ff }\n theme_color: {tags:\"good_pop weak text\", value: 0xe3f5d3ff }\n theme_color: {tags:\"bad_pop background\", value: 0x803425ff }\n theme_color: {tags:\"bad_pop hover\", value: 0xff825cff }\n theme_color: {tags:\"code_default\", value: 0xcbcbcbff }\n theme_color: {tags:\"code_symbol\", value: 0x42a2cfff }\n theme_color: {tags:\"code_type\", value: 0xfec746ff }\n theme_color: {tags:\"code_local\", value: 0x98bc80ff }\n theme_color: {tags:\"code_register\", value: 0xb7afd5ff }\n theme_color: {tags:\"code_keyword\", value: 0xb38d4cff }\n theme_color: {tags:\"code_delimiter_or_operator\", value: 0x767676ff }\n theme_color: {tags:\"code_numeric\", value: 0x98abb1ff }\n theme_color: {tags:\"code_numeric_alt_digit_group\", value: 0x738287ff }\n theme_color: {tags:\"code_string\", value: 0x98abb1ff }\n theme_color: {tags:\"code_meta\", value: 0xd96759ff }\n theme_color: {tags:\"code_comment\", value: 0x717171ff }\n theme_color: {tags:\"line_info_0\", value: 0x4f3022ff }\n theme_color: {tags:\"line_info_1\", value: 0x4f3e15ff }\n theme_color: {tags:\"line_info_2\", value: 0x434e2aff }\n theme_color: {tags:\"line_info_3\", value: 0x36241fff }\n theme_color: {tags:\"line_info_4\", value: 0x4f3022ff }\n theme_color: {tags:\"line_info_5\", value: 0x4f3e15ff }\n theme_color: {tags:\"line_info_6\", value: 0x434e2aff }\n theme_color: {tags:\"line_info_7\", value: 0x36241fff }\n theme_color: {tags:\"thread_0\", value: 0xffcb7fff }\n theme_color: {tags:\"thread_1\", value: 0xb2ff65ff }\n theme_color: {tags:\"thread_2\", value: 0xff99e5ff }\n theme_color: {tags:\"thread_3\", value: 0x6598ffff }\n theme_color: {tags:\"thread_4\", value: 0x65ffcbff }\n theme_color: {tags:\"thread_5\", value: 0xff9819ff }\n theme_color: {tags:\"thread_6\", value: 0x9932ffff }\n theme_color: {tags:\"thread_7\", value: 0x65ff4cff }\n theme_color: {tags:\"thread_unwound\", value: 0xb2ccd8ff }\n theme_color: {tags:\"thread_error\", value: 0xb23219ff }\n theme_color: {tags:\"breakpoint\", value: 0xa72911ff }\n theme_color: {tags:\"floating background\", value: 0x1b1b1baf }\n theme_color: {tags:\"floating background alt\", value: 0x0000005f }\n theme_color: {tags:\"floating background fresh\", value:Line truncated
|
||||
str8_lit_comp("theme:\n{\n theme_color:{ tags: background , value: 0xffffffff }\n theme_color:{ tags: \"alt background\" , value: 0xf8f8f8ff }\n theme_color:{ tags: \"pop background\" , value: 0xcbe4f2ff }\n theme_color:{ tags: \"menu_bar pop background\" , value: 0x5aabd9ff }\n theme_color:{ tags: \"fresh background\" , value: 0xeaddceff }\n theme_color:{ tags: \"match background\" , value: 0xc1e9c4ff }\n theme_color:{ tags: border , value: 0xcbcbcbff }\n theme_color:{ tags: text , value: 0xff }\n theme_color:{ tags: \"weak text\" , value: 0x727272ff }\n theme_color:{ tags: \"good text\" , value: 0x217538ff }\n theme_color:{ tags: \"neutral text\" , value: 0x1a5b7cff }\n theme_color:{ tags: \"bad text\" , value: 0x972717ff }\n theme_color:{ tags: hover , value: 0xff }\n theme_color:{ tags: \"focus overlay\" , value: 0x67ff4b }\n theme_color:{ tags: \"focus border\" , value: 0x67ffff }\n theme_color:{ tags: cursor , value: 0xff }\n theme_color:{ tags: selection , value: 0x283d5166 }\n theme_color:{ tags: \"inactive background\" , value: 0x8 }\n theme_color:{ tags: drop_shadow , value: 0xb }\n theme_color:{ tags: \"good_pop background\" , value: 0x90c09aff }\n theme_color:{ tags: \"good_pop border\" , value: 0x1e7231ff }\n theme_color:{ tags: \"good_pop hover\" , value: 0xe3f5d3ff }\n theme_color:{ tags: \"good_pop weak text\" , value: 0xe3f5d3ff }\n theme_color:{ tags: \"good_pop text\" , value: 0xe3f5d3ff }\n theme_color:{ tags: \"bad_pop background\" , value: 0xa93620ff }\n theme_color:{ tags: \"bad_pop text\" , value: 0xffffffff }\n theme_color:{ tags: \"bad_pop text weak\" , value: 0xffffffff }\n theme_color:{ tags: \"menu_bar bad_pop background\" , value: 0xff2a00ff }\n theme_color:{ tags: \"menu_bar bad_pop text\" , value: 0xffffffff }\n theme_color:{ tags: \"bad_pop hover\" , value: 0xff825cff }\n theme_color:{ tags: code_default , value: 0x80808ff }\n theme_color:{ tags: code_symbol , value: 0x4ac3ff }\n theme_color:{ tags: code_type , value: 0xf46200ff }\n theme_color:{ tags: code_local , value: 0x317c00ff }\n theme_color:{ tags: code_register , value: 0x9a00ffff }\n theme_color:{ tags: code_keyword , value: 0xff0600ff }\n theme_color:{ tags: code_delimiter_or_operator , value: 0x8a8a8aff }\n theme_color:{ tags: code_numeric , value: 0x7d49ff }\n theme_color:{ tags: code_numeric_alt_digit_group , value: 0xb56aff }\n theme_color:{ tags: code_string , value: 0x63549fff }\n theme_color:{ tags: code_meta , value: 0xd96759ff }\n theme_color:{ tags: code_comment , value: 0x717171ff }\n theme_color:{ tags: line_info_0 , value: 0xe6d5cdff }\n theme_color:{ tags: line_info_1 , value: 0xdbcfb2ff }\n theme_color:{ tags: line_info_2 , value: 0xddeac1ff }\n theme_color:{ tags: line_info_3 , value: 0xddc4bdff }\n theme_color:{ tags: line_info_4 , value: 0xba917eff }\n theme_color:{ tags: thread_0 , value: 0xffa700ff }\n theme_color:{ tags: thread_1 , value: 0xb41fff }\n theme_color:{ tags: thread_2 , value: 0xff99e5ff }\n theme_color:{ tags: thread_3 , value: 0x6598ffff }\n theme_color:{ tags: thread_4 , value: 0x65ffcbff }\n theme_color:{ tags: thread_5 , value: 0xff9819ff }\n theme_color:{ tags: thread_6 , value: 0x9932ffff }\n theme_color:{ tags: thread_7 , value: 0x65ff4cff }\n theme_color:{ tags: thread_unwound , value: 0xb2ccd8ff }\n theme_color:{ tags: thread_error , value: 0xb23219ff }\n theme_color:{ tags: breakpoint , value: 0xff2800ff }\n theme_color:{ tags: \"floating background\" , value: 0xffffffc7 }\n theme_color:{ tags: \"floating background alt\" , value: 0x23 }\n theme_color:{ tags: \"floating background fresh\" , value: 0xeaddceff }\n theme_color:{ tags: \"floating border\" , value: 0x88888884 }\n theme_color:{ tags: \"scroll_bar background\" , value: 0xe9e9e9ff }\n theme_color:{ tags: \"scroll_bar border\" , value: 0x5f5f5f5f }\n theme_color:{ tags: \"floating scroll_bar background\" , value: 0xe9e9e9ff }\n theme_color:{ tags: \"floating scroll_bar border\" , value: 0x5f5f5f5f }\n theme_color:{ tags: \"menu_bar background\" , value: 0x2b6b9aff }\n theme_color:{ tags: \"menu_bar border\" , value: 0x4d }\n theme_color:{ tags: \"menu_bar text\" , value: 0xffffffff }\n theme_color:{ tags: \"menu_bar text weak\" , value: 0xffffffff }\n theme_color:{ tags: \"good menu_bar text\" , value: 0x70db8dff }\n theme_color:{ tags: \"bad menu_bar text\" , value: 0xffa79bff }\n theme_color:{ tags: \"neutral menu_bar text\" , value: 0xc4dbe7ff }\n theme_color:{ tags: \"implicit background\" , value: 0x00000000 }\n theme_color:{ tags: \"implicit border\" , value: 0x00000000 }\n theme_color:{ tags: \"hollow background\" , value: 0x00000000 }\n theme_color:{ tags: \"hollow border\" , value: 0xffffff1f }\n theme_color:{ tags: \"tab text\" , value: 0xffffffff }\n theme_color:{ tags:Line truncated
|
||||
str8_lit_comp("theme:\n{\n theme_color:{ tags: background , value: 0x1f1f1fff }\n theme_color:{ tags: \"alt background\" , value: 0x222222ff }\n theme_color:{ tags: \"pop background\" , value: 0x383167ff }\n theme_color:{ tags: \"fresh background\" , value: 0x31393dff }\n theme_color:{ tags: \"match background\" , value: 0x31393dff }\n theme_color:{ tags: border , value: 0x404040ff }\n theme_color:{ tags: text , value: 0xe5e5e5ff }\n theme_color:{ tags: \"weak text\" , value: 0xa4a4a4ff }\n theme_color:{ tags: \"good text\" , value: 0x32a852ff }\n theme_color:{ tags: \"neutral text\" , value: 0x3a90bbff }\n theme_color:{ tags: \"bad text\" , value: 0xcf5242ff }\n theme_color:{ tags: hover , value: 0xffffffff }\n theme_color:{ tags: \"focus overlay\" , value: 0x7160e81e }\n theme_color:{ tags: \"focus border\" , value: 0x7160e8ff }\n theme_color:{ tags: cursor , value: 0x8aff00ff }\n theme_color:{ tags: selection , value: 0x99ccff0f }\n theme_color:{ tags: \"inactive background\" , value: 0x0000002f }\n theme_color:{ tags: drop_shadow , value: 0x0000007f }\n theme_color:{ tags: \"good_pop background\" , value: 0x2c5b36ff }\n theme_color:{ tags: \"good_pop border\" , value: 0x568761ff }\n theme_color:{ tags: \"good_pop hover\" , value: 0xe3f5d3ff }\n theme_color:{ tags: \"good_pop weak text\" , value: 0xe3f5d3ff }\n theme_color:{ tags: \"bad_pop background\" , value: 0x803425ff }\n theme_color:{ tags: \"bad_pop hover\" , value: 0xff825cff }\n theme_color:{ tags: code_default , value: 0xe0e0e0ff }\n theme_color:{ tags: code_symbol , value: 0xdcdcaaff }\n theme_color:{ tags: code_type , value: 0x4ec9b0ff }\n theme_color:{ tags: code_local , value: 0x9cdcfeff }\n theme_color:{ tags: code_register , value: 0xb7afd5ff }\n theme_color:{ tags: code_keyword , value: 0x569cd6ff }\n theme_color:{ tags: code_delimiter_or_operator , value: 0x767676ff }\n theme_color:{ tags: code_numeric , value: 0xb5cea8ff }\n theme_color:{ tags: code_numeric_alt_digit_group , value: 0x7c986dff }\n theme_color:{ tags: code_string , value: 0xd69d85ff }\n theme_color:{ tags: code_meta , value: 0x9b9b9bff }\n theme_color:{ tags: code_comment , value: 0x51a644ff }\n theme_color:{ tags: line_info_0 , value: 0x4f3022ff }\n theme_color:{ tags: line_info_1 , value: 0x4f3e15ff }\n theme_color:{ tags: line_info_2 , value: 0x434e2aff }\n theme_color:{ tags: line_info_3 , value: 0x36241fff }\n theme_color:{ tags: line_info_4 , value: 0x4f3022ff }\n theme_color:{ tags: line_info_5 , value: 0x4f3e15ff }\n theme_color:{ tags: line_info_6 , value: 0x434e2aff }\n theme_color:{ tags: line_info_7 , value: 0x36241fff }\n theme_color:{ tags: thread_0 , value: 0xffdc48ff }\n theme_color:{ tags: thread_1 , value: 0xb2ff65ff }\n theme_color:{ tags: thread_2 , value: 0xff99e5ff }\n theme_color:{ tags: thread_3 , value: 0x6598ffff }\n theme_color:{ tags: thread_4 , value: 0x65ffcbff }\n theme_color:{ tags: thread_5 , value: 0xff9819ff }\n theme_color:{ tags: thread_6 , value: 0x9932ffff }\n theme_color:{ tags: thread_7 , value: 0x65ff4cff }\n theme_color:{ tags: thread_unwound , value: 0xb2ccd8ff }\n theme_color:{ tags: thread_error , value: 0xb23219ff }\n theme_color:{ tags: breakpoint , value: 0xa72911ff }\n theme_color:{ tags: \"floating background\" , value: 0x1b1b1baf }\n theme_color:{ tags: \"floating background alt\" , value: 0x0000005f }\n theme_color:{ tags: \"floating background fresh\" , value: 0x31393d5f }\n theme_color:{ tags: \"floating border\" , value: 0xbfbfbf1f }\n theme_color:{ tags: \"floating scroll_bar background\" , value: 0x3b3b3b5f }\n theme_color:{ tags: \"floating scroll_bar border\" , value: 0x5f5f5f5f }\n theme_color:{ tags: \"scroll_bar background\" , value: 0x2b2b2bff }\n theme_color:{ tags: \"scroll_bar border\" , value: 0x3f3f3fff }\n theme_color:{ tags: \"implicit background\" , value: 0x00000000 }\n theme_color:{ tags: \"implicit border\" , value: 0x00000000 }\n theme_color:{ tags: \"hollow background\" , value: 0x00000000 }\n theme_color:{ tags: \"hollow border\" , value: 0xffffff1f }\n theme_color:{ tags: \"tab background\" , value: 0x333333ff }\n theme_color:{ tags: \"tab border\" , value: 0x7160e8ff }\n theme_color:{ tags: \"tab inactive background\" , value: 0x171717ff }\n theme_color:{ tags: \"tab inactive border\" , value: 0x3e4c57ff }\n theme_color:{ tags: \"tab auto background\" , value: 0x3f386dff }\n theme_color:{ tags: \"tab auto border\" , value: 0x7160e8ff }\n theme_color:{ tags: \"tab auto inactive background\" , value: 0x2f2633ff }\n theme_color:{ tags: \"tab auto inactive border\" , value: 0x685073ff }\n theme_color:{ tags: \"drop_site background\" , value: 0xffffff05 }\n theme_color:{ tags: \"drop_site border\" , value: 0xffffff0f }\n}\n"),
|
||||
|
||||
@@ -388,7 +388,6 @@ RD_CodeColorSlot_COUNT,
|
||||
|
||||
typedef enum RD_ThemePreset
|
||||
{
|
||||
RD_ThemePreset_None,
|
||||
RD_ThemePreset_DefaultDark,
|
||||
RD_ThemePreset_DefaultLight,
|
||||
RD_ThemePreset_VSDark,
|
||||
@@ -568,9 +567,9 @@ extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
extern String8 rd_binding_version_remap_new_name_table[8];
|
||||
extern String8 rd_icon_kind_text_table[75];
|
||||
extern String8 rd_code_color_slot_name_table[14];
|
||||
extern String8 rd_theme_preset_display_string_table[11];
|
||||
extern String8 rd_theme_preset_code_string_table[11];
|
||||
extern String8 rd_theme_preset_cfg_string_table[11];
|
||||
extern String8 rd_theme_preset_display_string_table[10];
|
||||
extern String8 rd_theme_preset_code_string_table[10];
|
||||
extern String8 rd_theme_preset_cfg_string_table[10];
|
||||
read_only global U8 rd_icon_font_bytes__data[] =
|
||||
{
|
||||
0x00,0x01,0x00,0x00,0x00,0x0f,0x00,0x80,0x00,0x03,0x00,0x70,0x47,0x53,0x55,0x42,0x20,0x8b,0x25,0x7a,0x00,0x00,0x00,0xfc,0x00,0x00,0x00,0x54,0x4f,0x53,0x2f,0x32,0x56,0x43,0x62,0x25,0x00,0x00,0x01,0x50,0x00,0x00,0x00,0x60,0x63,0x6d,0x61,0x70,0xa3,0x60,0xa4,0x23,0x00,0x00,0x01,0xb0,0x00,0x00,0x06,0x12,0x63,0x76,0x74,0x20,
|
||||
|
||||
@@ -237,8 +237,10 @@ RD_VocabTable:
|
||||
'code_font': string,
|
||||
|
||||
//- rjf: theme
|
||||
@display_name('User Theme') 'theme': string,
|
||||
@no_expand @display_name('User Theme') @description("The user's theme, which describes all colors used throughout the UI.")
|
||||
@default("Default (Dark)") @display_name('User Theme')
|
||||
@description("The user's theme, which describes all colors used throughout the UI.")
|
||||
'theme': string,
|
||||
@no_expand @display_name('User Theme')
|
||||
'theme_colors': query,
|
||||
|
||||
//- rjf: autocompletion
|
||||
@@ -294,7 +296,8 @@ RD_VocabTable:
|
||||
@default(1) use_default_ue_type_views: bool,
|
||||
|
||||
//- rjf: theme
|
||||
@display_name('Project Theme') 'theme': string,
|
||||
@default("None") @display_name('Project Theme') @description("The project's theme, which describes all colors used throughout the UI, and can override the user's theme.")
|
||||
'theme': string,
|
||||
@no_expand @display_name('Project Theme') @description("The project's theme, which describes all colors used throughout the UI, and can override the user's theme.")
|
||||
'theme_colors': query,
|
||||
|
||||
@@ -1365,9 +1368,6 @@ RD_IconTable:
|
||||
@table(name_upper name_lower display_string cfg)
|
||||
RD_ThemePresetTable:
|
||||
{
|
||||
//- rjf: stub
|
||||
{None none "None" ""}
|
||||
|
||||
//- rjf: default dark theme
|
||||
{
|
||||
DefaultDark default_dark "Default (Dark)",
|
||||
|
||||
@@ -4837,6 +4837,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
}
|
||||
|
||||
// rjf: form cell build parameters
|
||||
UI_Key line_edit_key = {0};
|
||||
RD_CellParams cell_params = {0};
|
||||
ProfScope("form cell build parameters")
|
||||
{
|
||||
@@ -4851,6 +4852,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
cell_params.edit_buffer = cell_edit_state->input_buffer;
|
||||
cell_params.edit_buffer_size = sizeof(cell_edit_state->input_buffer);
|
||||
cell_params.edit_string_size_out = &cell_edit_state->input_size;
|
||||
cell_params.line_edit_key_out = &line_edit_key;
|
||||
cell_params.expanded_out = &next_row_expanded;
|
||||
cell_params.search_needle = needle;
|
||||
cell_params.meta_fstrs = cell_info.expr_fstrs;
|
||||
@@ -4968,7 +4970,7 @@ rd_view_ui(Rng2F32 rect)
|
||||
{
|
||||
list_expr = cursor_info.list_expr;
|
||||
}
|
||||
rd_set_autocomp_regs(.ui_key = sig.box->key,
|
||||
rd_set_autocomp_regs(.ui_key = line_edit_key,
|
||||
.string = cursor_info.filter,
|
||||
.expr = list_expr);
|
||||
}
|
||||
@@ -5801,7 +5803,7 @@ rd_window_frame(void)
|
||||
if(rd_setting_b32_from_name(str8_lit("use_project_theme")))
|
||||
{
|
||||
theme_cfg = theme_cfgs[0];
|
||||
if(theme_cfg == &rd_nil_cfg || str8_match(theme_cfg->first->string, rd_theme_preset_display_string_table[RD_ThemePreset_None], 0))
|
||||
if(theme_cfg == &rd_nil_cfg)
|
||||
{
|
||||
theme_cfg = theme_cfgs[1];
|
||||
}
|
||||
@@ -5814,7 +5816,7 @@ rd_window_frame(void)
|
||||
String8 theme_name = theme_cfg->first->string;
|
||||
if(theme_name.size != 0)
|
||||
{
|
||||
for EachNonZeroEnumVal(RD_ThemePreset, p)
|
||||
for EachEnumVal(RD_ThemePreset, p)
|
||||
{
|
||||
if(str8_match(theme_name, rd_theme_preset_display_string_table[p], 0))
|
||||
{
|
||||
@@ -9642,10 +9644,17 @@ rd_autocomp_primary_list_expr_from_dst_eval(Arena *arena, E_Eval dst_eval)
|
||||
{
|
||||
String8 result = str8_lit("query:locals, query:globals, query:thread_locals, query:procedures, query:types");
|
||||
{
|
||||
E_TypeKey maybe_enum_type = e_type_key_unwrap(dst_eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative & ~E_TypeUnwrapFlag_Enums);
|
||||
if(dst_eval.space.kind == RD_EvalSpaceKind_MetaCfg && str8_match(e_string_from_id(dst_eval.space.u64s[1]), str8_lit("theme"), 0))
|
||||
{
|
||||
result = str8_lit("query:themes");
|
||||
}
|
||||
#if 0
|
||||
else if(e_type_kind_from_key(maybe_enum_type) == E_TypeKind_Enum)
|
||||
{
|
||||
result = e_type_string_from_key(arena, maybe_enum_type);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -968,6 +968,7 @@ internal void rd_set_autocomp_regs_(RD_Regs *regs);
|
||||
//~ rjf: Colors, Fonts, Config
|
||||
|
||||
//- rjf: colors
|
||||
internal UI_Theme *rd_ui_theme_from_tree(MD_Node *tree);
|
||||
internal Vec4F32 rd_rgba_from_code_color_slot(RD_CodeColorSlot slot);
|
||||
internal RD_CodeColorSlot rd_code_color_slot_from_txt_token_kind(TXT_TokenKind kind);
|
||||
internal RD_CodeColorSlot rd_code_color_slot_from_txt_token_kind_lookup_string(TXT_TokenKind kind, String8 string);
|
||||
|
||||
@@ -1851,6 +1851,25 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms, name);
|
||||
result.expr_fstrs = fstrs;
|
||||
}break;
|
||||
|
||||
//- rjf: unattached processes
|
||||
case RD_EvalSpaceKind_MetaTheme:
|
||||
{
|
||||
String8 name = e_string_from_id(cell->eval.value.u64);
|
||||
DR_FStrParams params = {rd_font_from_slot(RD_FontSlot_Main), rd_raster_flags_from_slot(RD_FontSlot_Main), ui_color_from_name(str8_lit("text")), ui_top_font_size()};
|
||||
DR_FStrList fstrs = {0};
|
||||
UI_TagF("weak")
|
||||
{
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms,
|
||||
rd_icon_kind_text_table[RD_IconKind_Palette],
|
||||
.font = rd_font_from_slot(RD_FontSlot_Icons),
|
||||
.raster_flags = rd_raster_flags_from_slot(RD_FontSlot_Icons),
|
||||
.color = ui_color_from_name(str8_lit("text")));
|
||||
}
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms, str8_lit(" "));
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms, name);
|
||||
result.eval_fstrs = fstrs;
|
||||
}break;
|
||||
}
|
||||
scratch_end(scratch);
|
||||
return result;
|
||||
|
||||
+109
-12
@@ -3211,6 +3211,7 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
B32 build_slider = !!(params->flags & RD_CellFlag_Slider) && !is_focus_active;
|
||||
B32 build_bindings = !!(params->flags & RD_CellFlag_Bindings) && !is_focus_active;
|
||||
B32 build_lhs_name_desc = (params->meta_fstrs.node_count != 0 || params->description.size != 0);
|
||||
B32 build_line_edit = (params->pre_edit_value.size != 0 || params->value_fstrs.node_count != 0);
|
||||
DR_FStrList lhs_name_fstrs = params->meta_fstrs;
|
||||
DR_FStrList value_name_fstrs = params->value_fstrs;
|
||||
|
||||
@@ -3237,6 +3238,7 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
ui_set_next_hover_cursor(OS_Cursor_IBar);
|
||||
}
|
||||
UI_Box *box = ui_build_box_from_key(UI_BoxFlag_MouseClickable|
|
||||
(!!build_lhs_name_desc*UI_BoxFlag_DisableFocusBorder)|
|
||||
(!!(params->flags & RD_CellFlag_KeyboardClickable)*UI_BoxFlag_KeyboardClickable)|
|
||||
UI_BoxFlag_ClickToFocus|
|
||||
(!!(params->flags & RD_CellFlag_Button)*UI_BoxFlag_DrawHotEffects)|
|
||||
@@ -3297,6 +3299,10 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
{
|
||||
UI_Parent(box) UI_WidthFill UI_ChildLayoutAxis(Axis2_Y)
|
||||
{
|
||||
if(ui_top_text_alignment() == UI_TextAlign_Left && (params->flags & (RD_CellFlag_Expander|RD_CellFlag_ExpanderSpace|RD_CellFlag_ExpanderPlaceholder)) == 0)
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
lhs_box = ui_build_box_from_stringf(0, "lhs_box");
|
||||
}
|
||||
}
|
||||
@@ -3313,10 +3319,6 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
}
|
||||
UI_Row
|
||||
{
|
||||
if(ui_top_text_alignment() == UI_TextAlign_Left && (params->flags & (RD_CellFlag_Expander|RD_CellFlag_ExpanderSpace|RD_CellFlag_ExpanderPlaceholder)) == 0)
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
UI_Box *name_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero());
|
||||
ui_box_equip_display_fstrs(name_box, &lhs_name_fstrs);
|
||||
ui_box_equip_fuzzy_match_ranges(name_box, &fuzzy_matches);
|
||||
@@ -3325,7 +3327,6 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
{
|
||||
UI_Row
|
||||
{
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
UI_Box *desc_box = ui_label(params->description).box;
|
||||
FuzzyMatchRangeList desc_fuzzy_matches = fuzzy_match_find(scratch.arena, params->search_needle, params->description);
|
||||
ui_box_equip_fuzzy_match_ranges(desc_box, &desc_fuzzy_matches);
|
||||
@@ -3333,21 +3334,115 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: build reset-to-default, if line edit is embedded & it is marked
|
||||
//
|
||||
#if 0
|
||||
if(!is_focus_active && !is_focus_active_disabled)
|
||||
{
|
||||
UI_TagF(".")
|
||||
UI_TagF("weak")
|
||||
UI_TagF("implicit")
|
||||
UI_Parent(box)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
{
|
||||
UI_Column
|
||||
UI_Padding(ui_pct(1, 0))
|
||||
UI_PrefHeight(ui_em(2.f, 1.f))
|
||||
UI_CornerRadius(ui_top_font_size()*0.5f)
|
||||
UI_HoverCursor(OS_Cursor_HandPoint)
|
||||
RD_Font(RD_FontSlot_Icons)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
{
|
||||
UI_Box *edit_start_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|
|
||||
UI_BoxFlag_DrawHotEffects|
|
||||
UI_BoxFlag_DrawBorder|
|
||||
UI_BoxFlag_DrawBackground|
|
||||
UI_BoxFlag_DisableFocusOverlay|
|
||||
UI_BoxFlag_DisableFocusBorder|
|
||||
UI_BoxFlag_Clickable,
|
||||
"%S##undo", rd_icon_kind_text_table[RD_IconKind_Undo]);
|
||||
UI_Signal sig = ui_signal_from_box(edit_start_box);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: build line edit container box
|
||||
//
|
||||
UI_Box *edit_box = &ui_nil_box;
|
||||
UI_Parent(box) if((is_focus_active || is_focus_active_disabled) ||
|
||||
params->pre_edit_value.size != 0 ||
|
||||
params->value_fstrs.node_count != 0)
|
||||
if((is_focus_active || is_focus_active_disabled) || build_line_edit)
|
||||
UI_Parent(box)
|
||||
{
|
||||
B32 is_editing = (is_focus_active || is_focus_active_disabled);
|
||||
UI_Size edit_box_size = ui_pct(1, 0);
|
||||
if(build_lhs_name_desc)
|
||||
{
|
||||
edit_box_size = ui_children_sum(1);
|
||||
F32 px_size = is_editing ? (floor_f32(dim_2f32(box->rect).x*0.5f)) : floor_f32(dr_dim_from_fstrs(&value_name_fstrs).x + ui_top_font_size()*1.5f);
|
||||
edit_box_size = ui_px(px_size, 1.f);
|
||||
}
|
||||
UI_PrefWidth(edit_box_size)
|
||||
edit_box = ui_build_box_from_stringf(0, "edit_box");
|
||||
{
|
||||
if(ui_top_px_height() > ui_top_font_size()*3.f)
|
||||
{
|
||||
ui_set_next_pref_width(ui_children_sum(1));
|
||||
UI_Column UI_Padding(ui_em(1, 0)) UI_Focus(UI_FocusKind_On)
|
||||
{
|
||||
UI_PrefHeight(ui_em(3.f, 1.f)) UI_CornerRadius(ui_top_font_size()*0.5f)
|
||||
edit_box = ui_build_box_from_stringf((!!is_editing*UI_BoxFlag_DrawBorder)|
|
||||
UI_BoxFlag_Clickable|
|
||||
UI_BoxFlag_DisableFocusOverlay,
|
||||
"edit_box");
|
||||
if(params->line_edit_key_out)
|
||||
{
|
||||
params->line_edit_key_out[0] = edit_box->key;
|
||||
}
|
||||
}
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
else
|
||||
{
|
||||
edit_box = ui_build_box_from_stringf(0, "edit_box");
|
||||
if(params->line_edit_key_out)
|
||||
{
|
||||
params->line_edit_key_out[0] = edit_box->key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: build edit-button, if line edit is embedded, and has no string
|
||||
//
|
||||
if(!is_focus_active && !is_focus_active_disabled && build_lhs_name_desc && build_line_edit && value_name_fstrs.total_size == 0)
|
||||
{
|
||||
UI_TagF(".")
|
||||
UI_TagF("weak")
|
||||
UI_TagF("implicit")
|
||||
UI_Parent(box)
|
||||
UI_PrefWidth(ui_em(2.f, 1.f))
|
||||
{
|
||||
UI_Column
|
||||
UI_Padding(ui_pct(1, 0))
|
||||
UI_PrefHeight(ui_em(2.f, 1.f))
|
||||
UI_CornerRadius(ui_top_font_size()*0.5f)
|
||||
UI_HoverCursor(OS_Cursor_HandPoint)
|
||||
RD_Font(RD_FontSlot_Icons)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
{
|
||||
UI_Box *edit_start_box = ui_build_box_from_stringf(UI_BoxFlag_DrawText|
|
||||
UI_BoxFlag_DrawHotEffects|
|
||||
UI_BoxFlag_DrawBorder|
|
||||
UI_BoxFlag_DrawBackground|
|
||||
UI_BoxFlag_DisableFocusOverlay|
|
||||
UI_BoxFlag_DisableFocusBorder|
|
||||
UI_BoxFlag_Clickable,
|
||||
"%S##edit", rd_icon_kind_text_table[RD_IconKind_Pencil]);
|
||||
UI_Signal sig = ui_signal_from_box(edit_start_box);
|
||||
}
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
@@ -3374,7 +3469,7 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
UI_PrefWidth(ui_children_sum(1.f))
|
||||
UI_HeightFill
|
||||
UI_Column UI_Padding(ui_px(padding_px, 1.f))
|
||||
UI_Row UI_Padding(ui_px(padding_px, 1.f))
|
||||
UI_Row
|
||||
UI_PrefWidth(ui_em(3.5f, 1.f))
|
||||
UI_PrefHeight(ui_px(height_px, 1.f))
|
||||
UI_CornerRadius(floor_f32(height_px/2.f - 1.f))
|
||||
@@ -3410,6 +3505,7 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
params->toggled_out[0] ^= 1;
|
||||
}
|
||||
}
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
@@ -3422,7 +3518,7 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
UI_PrefWidth(ui_children_sum(1.f))
|
||||
UI_HeightFill
|
||||
UI_Column UI_Padding(ui_px(padding_px, 1.f))
|
||||
UI_Row UI_Padding(ui_px(padding_px, 1.f))
|
||||
UI_Row
|
||||
UI_PrefWidth(ui_pct(0.5f - 0.2f*(!!build_lhs_name_desc), 0.f))
|
||||
UI_PrefHeight(ui_px(height_px, 1.f))
|
||||
UI_CornerRadius(floor_f32(height_px/2.f - 1.f))
|
||||
@@ -3469,6 +3565,7 @@ rd_cell(RD_CellParams *params, String8 string)
|
||||
ui_spacer(ui_pct(1-Clamp(0, params->slider_value_out[0], 1), 0.f));
|
||||
}
|
||||
}
|
||||
ui_spacer(ui_em(1.f, 1.f));
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
|
||||
@@ -68,6 +68,7 @@ struct RD_CellParams
|
||||
U8 *edit_buffer;
|
||||
U64 edit_buffer_size;
|
||||
U64 *edit_string_size_out;
|
||||
UI_Key *line_edit_key_out;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
Reference in new issue
Block a user