diff --git a/src/raddbg/generated/raddbg.meta.c b/src/raddbg/generated/raddbg.meta.c index 879bb148..0a4ace89 100644 --- a/src/raddbg/generated/raddbg.meta.c +++ b/src/raddbg/generated/raddbg.meta.c @@ -379,7 +379,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[22] = { {str8_lit_comp("user"), str8_lit_comp("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 'main_font': string,\n 'code_font': string,\n\n //- rjf: colors\n @display_name('Color Preset')\n 'color_preset': string,\n @display_name('Color File')\n 'color_file': path,\n @display_name('Colors')\n 'colors': query,\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("x:\n{\n @default(2) @display_name('Project Tab Width') 'tab_width': @range[1, 32] u64,\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\") @description(\"Code: 0xc0000138\")\n win32_ordinal_not_found: bool;\n @default(0) @display_name(\"Break On Win32 Entry Point Not Found Exceptions\") @description(\"Code: 0xc0000139\")\n win32_entry_point_not_found: bool;\n @default(0) @display_name(\"Break On Win32 DLL Initialization Failed Exceptions\") @description(\"Code: 0xc0000142\")\n win32_dll_initialization_failed: bool;\n @default(0) @display_name(\"Break On Win32 Floating Point SSE Multiple Faults Exceptions\") @description(\"Code: 0xc00002b4\")\n win32_floating_point_sse_multiple_faults: bool;\n @default(0) @display_name(\"Break On Win32 Floating Point SSE Multiple Traps Exceptions\") @description(\"Code: 0xc00002b5\")\n win32_floating_point_sse_multiple_traps: bool;\n @default(1) @display_name(\"Break On Win32 Assertion Failed Exceptions\") @description(\"Code: 0xc0000420\")\n win32_assertion_failed: bool;\n @default(0) @display_name(\"Break On Win32 Module Not Found Exceptions\") @description(\"Code: 0xc06d007e\")\n win32_module_not_found: bool;\n @default(0) @display_name(\"Break On Win32 Procedure Not Found Exceptions\") @description(\"Code: 0xc06d007f\")\n win32_procedure_not_found: bool;\n @default(1) @display_name(\"Break On Win32 Sanitizer Error Detected Exceptions\") @description(\"Code: 0xe073616e\")\n win32_sanitizer_error_detected: bool;\n @default(0) @display_name(\"Break On Win32 Sanitizer Raw Access Violation Exceptions\") @description(\"Code: 0xe0736171\")\n win32_sanitizer_raw_access_violation: bool;\n @default(1) @display_name(\"Break On Win32 DirectX Debug Layer Exceptions\") @description(\"Code: 0x0000087a\")\n win32_directx_debug_layer: bool;\n}\n")}, -{str8_lit_comp("color"), str8_lit_comp("@collection_commands(add_color, import_colors) x:\n{\n @display_name('Tags') tags: string,\n color: @color @hex u32,\n}\n")}, +{str8_lit_comp("color"), str8_lit_comp("@collection_commands(add_color, import_colors) x:\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")}, {str8_lit_comp("tab"), str8_lit_comp("x:\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")}, {str8_lit_comp("watch"), str8_lit_comp("@inherit(tab) x:\n{\n @default(3.f) @display_name('Tab Row Height') @description(\"Controls the tab's row height, in multiples of the font size.\")\n 'row_height': @range[1.75f, 5.f] f32,\n 'label': code_string,\n @description(\"The root expression which is evaluated to produce the watch window.\")\n 'expression': code_string,\n @no_expand 'watches': query,\n}\n")}, @@ -909,7 +909,7 @@ str8_lit_comp("far_manager"), String8 rd_theme_preset_cfg_string_table[9] = { -str8_lit_comp("theme:\n{\n background: 0x1b1b1bff,\n alt: background: 0x222222ff,\n pop: background: 0x355b6eff,\n fresh: background: 0x31393dff,\n match: background: 0x31393dff,\n border: 0x404040ff,\n text: 0xe5e5e5ff,\n weak: text: 0xa4a4a4ff,\n good: text: 0x32a852ff,\n bad: text: 0xcf5242ff,\n hover: 0xffffffff,\n focus: 0xfda200ff,\n cursor: 0x8aff00ff,\n selection: 0x99ccffff,\n inactive: background: 0x0000002f,\n drop_shadow: 0x0000007f,\n\n good_pop:\n {\n background: 0x2c5b36ff,\n border: 0x568761ff,\n hover: 0xe3f5d3ff,\n weak: text: 0xe3f5d3ff,\n }\n\n bad_pop:\n {\n background: 0x803425ff,\n hover: 0xff825cff,\n }\n\n code_default: 0xcbcbcbff,\n code_symbol: 0x42a2cfff,\n code_type: 0xfec746ff,\n code_local: 0x98bc80ff,\n code_register: 0xb7afd5ff,\n code_keyword: 0xb38d4cff,\n code_delimiter_or_operator: 0x767676ff,\n code_numeric: 0x98abb1ff,\n code_numeric_alt_digit_group: 0x738287ff,\n code_string: 0x98abb1ff,\n code_meta: 0xd96759ff,\n code_comment: 0x717171ff,\n line_info_0: 0x4f3022ff,\n line_info_1: 0x4f3e15ff,\n line_info_2: 0x434e2aff,\n line_info_3: 0x36241fff,\n line_info_4: 0x4f3022ff,\n line_info_5: 0x4f3e15ff,\n line_info_6: 0x434e2aff,\n line_info_7: 0x36241fff,\n thread_0: 0xffcb7fff,\n thread_1: 0xb2ff65ff,\n thread_2: 0xff99e5ff,\n thread_3: 0x6598ffff,\n thread_4: 0x65ffcbff,\n thread_5: 0xff9819ff,\n thread_6: 0x9932ffff,\n thread_7: 0x65ff4cff,\n thread_unwound: 0xb2ccd8ff,\n thread_error: 0xb23219ff,\n breakpoint: 0xa72911ff,\n\n floating:\n {\n background: 0x1b1b1baf,\n background: alt: 0x0000005f,\n background: fresh: 0x31393d5f,\n border: 0xbfbfbf1f,\n scroll_bar:\n {\n background: 0x3b3b3b5f,\n border: 0x5f5f5f5f,\n }\n }\n\n menu_bar:\n {\n background: 0x2b3740ff,\n border: 0x3e4c57ff,\n }\n\n scroll_bar:\n {\n background: 0x2b2b2bff,\n border: 0x3f3f3fff,\n }\n\n implicit:\n {\n background: 0x00000000,\n border: 0x00000000,\n }\n\n hollow:\n {\n background: 0x00000000,\n border: 0xffffff1f,\n }\n\n tab:\n {\n background: 0x6f5135ff,\n border: 0x8a6e54ff,\n inactive:\n {\n background: 0x2b3740ff,\n border: 0x3e4c57ff,\n }\n auto:\n {\n background: 0x693847ff,\n border: 0x9e6274ff,\n inactive:\n {\n background: 0x2f2633ff,\n border: 0x685073ff,\n }\n }\n }\n\n drop_site:\n {\n background: 0xffffff05,\n border: 0xffffff0f,\n }\n}\n"), +str8_lit_comp("theme:\n{\n color: {tags:\"background\", value: 0x1b1b1bff }\n color: {tags:\"alt background\", value: 0x222222ff }\n color: {tags:\"pop background\", value: 0x355b6eff }\n color: {tags:\"fresh background\", value: 0x31393dff }\n color: {tags:\"match background\", value: 0x31393dff }\n color: {tags:\"border\", value: 0x404040ff }\n color: {tags:\"text\", value: 0xe5e5e5ff }\n color: {tags:\"weak text\", value: 0xa4a4a4ff }\n color: {tags:\"good text\", value: 0x32a852ff }\n color: {tags:\"bad text\", value: 0xcf5242ff }\n color: {tags:\"hover\", value: 0xffffffff }\n color: {tags:\"focus\", value: 0xfda200ff }\n color: {tags:\"cursor\", value: 0x8aff00ff }\n color: {tags:\"selection\", value: 0x99ccffff }\n color: {tags:\"inactive background\", value: 0x0000002f }\n color: {tags:\"drop_shadow\", value: 0x0000007f }\n color: {tags:\"good_pop background\", value: 0x2c5b36ff }\n color: {tags:\"good_pop border\", value: 0x568761ff }\n color: {tags:\"good_pop hover\", value: 0xe3f5d3ff }\n color: {tags:\"good_pop weak text\", value: 0xe3f5d3ff }\n color: {tags:\"bad_pop background\", value: 0x803425ff }\n color: {tags:\"bad_pop hover\", value: 0xff825cff }\n color: {tags:\"code_default\", value: 0xcbcbcbff }\n color: {tags:\"code_symbol\", value: 0x42a2cfff }\n color: {tags:\"code_type\", value: 0xfec746ff }\n color: {tags:\"code_local\", value: 0x98bc80ff }\n color: {tags:\"code_register\", value: 0xb7afd5ff }\n color: {tags:\"code_keyword\", value: 0xb38d4cff }\n color: {tags:\"code_delimiter_or_operator\", value: 0x767676ff }\n color: {tags:\"code_numeric\", value: 0x98abb1ff }\n color: {tags:\"code_numeric_alt_digit_group\", value: 0x738287ff }\n color: {tags:\"code_string\", value: 0x98abb1ff }\n color: {tags:\"code_meta\", value: 0xd96759ff }\n color: {tags:\"code_comment\", value: 0x717171ff }\n color: {tags:\"line_info_0\", value: 0x4f3022ff }\n color: {tags:\"line_info_1\", value: 0x4f3e15ff }\n color: {tags:\"line_info_2\", value: 0x434e2aff }\n color: {tags:\"line_info_3\", value: 0x36241fff }\n color: {tags:\"line_info_4\", value: 0x4f3022ff }\n color: {tags:\"line_info_5\", value: 0x4f3e15ff }\n color: {tags:\"line_info_6\", value: 0x434e2aff }\n color: {tags:\"line_info_7\", value: 0x36241fff }\n color: {tags:\"thread_0\", value: 0xffcb7fff }\n color: {tags:\"thread_1\", value: 0xb2ff65ff }\n color: {tags:\"thread_2\", value: 0xff99e5ff }\n color: {tags:\"thread_3\", value: 0x6598ffff }\n color: {tags:\"thread_4\", value: 0x65ffcbff }\n color: {tags:\"thread_5\", value: 0xff9819ff }\n color: {tags:\"thread_6\", value: 0x9932ffff }\n color: {tags:\"thread_7\", value: 0x65ff4cff }\n color: {tags:\"thread_unwound\", value: 0xb2ccd8ff }\n color: {tags:\"thread_error\", value: 0xb23219ff }\n color: {tags:\"breakpoint\", value: 0xa72911ff }\n color: {tags:\"floating background\", value: 0x1b1b1baf }\n color: {tags:\"floating background alt\", value: 0x0000005f }\n color: {tags:\"floating background fresh\", value: 0x31393d5f }\n color: {tags:\"floating border\", value: 0xbfbfbf1f }\n color: {tags:\"floating scroll_bar background\", value: 0x3b3b3b5f }\n color: {tags:\"floating scroll_bar border\", value: 0x5f5f5f5f }\n color: {tags:\"menu_bar background\", value: 0x2b3740ff }\n color: {tags:\"menu_bar border\", value: 0x3e4c57ff }\n color: {tags:\"scroll_bar background\", value: 0x2b2b2bff }\n color: {tags:\"scroll_bar border\", value: 0x3f3f3fff }\n color: {tags:\"implicit background\", value: 0x00000000 }\n color: {tags:\"implicit border\", value: 0x00000000 }\n color: {tags:\"hollow background\", value: 0x00000000 }\n color: {tags:\"hollow border\", value: 0xffffff1f }\n color: {tags:\"tab background\", value: 0x6f5135ff }\n color: {tags:\"tab border\", value: 0x8a6e54ff }\n color: {tags:\"tab inactive background\", value: 0x2b3740ff }\n color: {tags:\"tab inactive border\", value: 0x3e4c57ff }\n color: {tags:\"tab auto background\", value: 0x693847ff }\n color: {tags:\"tab auto border\", value: 0x9e6274ff }\n color: {tags:\"tab auto inactive background\", value: 0x2f2633ff }\n color: {tags:\"tab auto inactive border\", value: 0x685073ff }\n color: {tags:\"drop_site background\", value: 0xffffff05 }\n color: {tags:\"drop_site border\", value: 0xffffff0f }\n}\n"), str8_lit_comp(""), str8_lit_comp("theme:\n{\n background: 0x1b0000ff,\n}\n"), str8_lit_comp(""), diff --git a/src/raddbg/raddbg.mdesk b/src/raddbg/raddbg.mdesk index ee29a4df..554dbcaf 100644 --- a/src/raddbg/raddbg.mdesk +++ b/src/raddbg/raddbg.mdesk @@ -362,7 +362,7 @@ RD_VocabTable: @collection_commands(add_color, import_colors) x: { @display_name('Tags') tags: string, - color: @color @hex u32, + @display_name('Value') value: @color @hex u32, } ``` } @@ -1299,132 +1299,83 @@ RD_ThemePresetTable: DefaultDark default_dark "Default (Dark)", ```theme: { - background: 0x1b1b1bff, - alt: background: 0x222222ff, - pop: background: 0x355b6eff, - fresh: background: 0x31393dff, - match: background: 0x31393dff, - border: 0x404040ff, - text: 0xe5e5e5ff, - weak: text: 0xa4a4a4ff, - good: text: 0x32a852ff, - bad: text: 0xcf5242ff, - hover: 0xffffffff, - focus: 0xfda200ff, - cursor: 0x8aff00ff, - selection: 0x99ccffff, - inactive: background: 0x0000002f, - drop_shadow: 0x0000007f, - - good_pop: - { - background: 0x2c5b36ff, - border: 0x568761ff, - hover: 0xe3f5d3ff, - weak: text: 0xe3f5d3ff, - } - - bad_pop: - { - background: 0x803425ff, - hover: 0xff825cff, - } - - code_default: 0xcbcbcbff, - code_symbol: 0x42a2cfff, - code_type: 0xfec746ff, - code_local: 0x98bc80ff, - code_register: 0xb7afd5ff, - code_keyword: 0xb38d4cff, - code_delimiter_or_operator: 0x767676ff, - code_numeric: 0x98abb1ff, - code_numeric_alt_digit_group: 0x738287ff, - code_string: 0x98abb1ff, - code_meta: 0xd96759ff, - code_comment: 0x717171ff, - line_info_0: 0x4f3022ff, - line_info_1: 0x4f3e15ff, - line_info_2: 0x434e2aff, - line_info_3: 0x36241fff, - line_info_4: 0x4f3022ff, - line_info_5: 0x4f3e15ff, - line_info_6: 0x434e2aff, - line_info_7: 0x36241fff, - thread_0: 0xffcb7fff, - thread_1: 0xb2ff65ff, - thread_2: 0xff99e5ff, - thread_3: 0x6598ffff, - thread_4: 0x65ffcbff, - thread_5: 0xff9819ff, - thread_6: 0x9932ffff, - thread_7: 0x65ff4cff, - thread_unwound: 0xb2ccd8ff, - thread_error: 0xb23219ff, - breakpoint: 0xa72911ff, - - floating: - { - background: 0x1b1b1baf, - background: alt: 0x0000005f, - background: fresh: 0x31393d5f, - border: 0xbfbfbf1f, - scroll_bar: - { - background: 0x3b3b3b5f, - border: 0x5f5f5f5f, - } - } - - menu_bar: - { - background: 0x2b3740ff, - border: 0x3e4c57ff, - } - - scroll_bar: - { - background: 0x2b2b2bff, - border: 0x3f3f3fff, - } - - implicit: - { - background: 0x00000000, - border: 0x00000000, - } - - hollow: - { - background: 0x00000000, - border: 0xffffff1f, - } - - tab: - { - background: 0x6f5135ff, - border: 0x8a6e54ff, - inactive: - { - background: 0x2b3740ff, - border: 0x3e4c57ff, - } - auto: - { - background: 0x693847ff, - border: 0x9e6274ff, - inactive: - { - background: 0x2f2633ff, - border: 0x685073ff, - } - } - } - - drop_site: - { - background: 0xffffff05, - border: 0xffffff0f, - } + color: {tags:"background", value: 0x1b1b1bff } + color: {tags:"alt background", value: 0x222222ff } + color: {tags:"pop background", value: 0x355b6eff } + color: {tags:"fresh background", value: 0x31393dff } + color: {tags:"match background", value: 0x31393dff } + color: {tags:"border", value: 0x404040ff } + color: {tags:"text", value: 0xe5e5e5ff } + color: {tags:"weak text", value: 0xa4a4a4ff } + color: {tags:"good text", value: 0x32a852ff } + color: {tags:"bad text", value: 0xcf5242ff } + color: {tags:"hover", value: 0xffffffff } + color: {tags:"focus", value: 0xfda200ff } + color: {tags:"cursor", value: 0x8aff00ff } + color: {tags:"selection", value: 0x99ccffff } + color: {tags:"inactive background", value: 0x0000002f } + color: {tags:"drop_shadow", value: 0x0000007f } + color: {tags:"good_pop background", value: 0x2c5b36ff } + color: {tags:"good_pop border", value: 0x568761ff } + color: {tags:"good_pop hover", value: 0xe3f5d3ff } + color: {tags:"good_pop weak text", value: 0xe3f5d3ff } + color: {tags:"bad_pop background", value: 0x803425ff } + color: {tags:"bad_pop hover", value: 0xff825cff } + color: {tags:"code_default", value: 0xcbcbcbff } + color: {tags:"code_symbol", value: 0x42a2cfff } + color: {tags:"code_type", value: 0xfec746ff } + color: {tags:"code_local", value: 0x98bc80ff } + color: {tags:"code_register", value: 0xb7afd5ff } + color: {tags:"code_keyword", value: 0xb38d4cff } + color: {tags:"code_delimiter_or_operator", value: 0x767676ff } + color: {tags:"code_numeric", value: 0x98abb1ff } + color: {tags:"code_numeric_alt_digit_group", value: 0x738287ff } + color: {tags:"code_string", value: 0x98abb1ff } + color: {tags:"code_meta", value: 0xd96759ff } + color: {tags:"code_comment", value: 0x717171ff } + color: {tags:"line_info_0", value: 0x4f3022ff } + color: {tags:"line_info_1", value: 0x4f3e15ff } + color: {tags:"line_info_2", value: 0x434e2aff } + color: {tags:"line_info_3", value: 0x36241fff } + color: {tags:"line_info_4", value: 0x4f3022ff } + color: {tags:"line_info_5", value: 0x4f3e15ff } + color: {tags:"line_info_6", value: 0x434e2aff } + color: {tags:"line_info_7", value: 0x36241fff } + color: {tags:"thread_0", value: 0xffcb7fff } + color: {tags:"thread_1", value: 0xb2ff65ff } + color: {tags:"thread_2", value: 0xff99e5ff } + color: {tags:"thread_3", value: 0x6598ffff } + color: {tags:"thread_4", value: 0x65ffcbff } + color: {tags:"thread_5", value: 0xff9819ff } + color: {tags:"thread_6", value: 0x9932ffff } + color: {tags:"thread_7", value: 0x65ff4cff } + color: {tags:"thread_unwound", value: 0xb2ccd8ff } + color: {tags:"thread_error", value: 0xb23219ff } + color: {tags:"breakpoint", value: 0xa72911ff } + color: {tags:"floating background", value: 0x1b1b1baf } + color: {tags:"floating background alt", value: 0x0000005f } + color: {tags:"floating background fresh", value: 0x31393d5f } + color: {tags:"floating border", value: 0xbfbfbf1f } + color: {tags:"floating scroll_bar background", value: 0x3b3b3b5f } + color: {tags:"floating scroll_bar border", value: 0x5f5f5f5f } + color: {tags:"menu_bar background", value: 0x2b3740ff } + color: {tags:"menu_bar border", value: 0x3e4c57ff } + color: {tags:"scroll_bar background", value: 0x2b2b2bff } + color: {tags:"scroll_bar border", value: 0x3f3f3fff } + color: {tags:"implicit background", value: 0x00000000 } + color: {tags:"implicit border", value: 0x00000000 } + color: {tags:"hollow background", value: 0x00000000 } + color: {tags:"hollow border", value: 0xffffff1f } + color: {tags:"tab background", value: 0x6f5135ff } + color: {tags:"tab border", value: 0x8a6e54ff } + color: {tags:"tab inactive background", value: 0x2b3740ff } + color: {tags:"tab inactive border", value: 0x3e4c57ff } + color: {tags:"tab auto background", value: 0x693847ff } + color: {tags:"tab auto border", value: 0x9e6274ff } + color: {tags:"tab auto inactive background", value: 0x2f2633ff } + color: {tags:"tab auto inactive border", value: 0x685073ff } + color: {tags:"drop_site background", value: 0xffffff05 } + color: {tags:"drop_site border", value: 0xffffff0f } } ``` } diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index a9c353a2..c79d8a35 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -5498,27 +5498,23 @@ rd_window_frame(void) // that windows can have their own colors, and have those override higher-up settings. RD_Cfg *preset_cfg = &rd_nil_cfg; RD_CfgList colors_cfgs = {0}; - RD_Cfg *scan_parents[] = {window, rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("project")), rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("theme")), rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("user"))}; + RD_Cfg *scan_parents[] = {window, rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("project")), rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("user"))}; for EachElement(idx, scan_parents) { - for(RD_Cfg *parent_cfg = scan_parents[idx]; parent_cfg != &rd_nil_cfg; parent_cfg = parent_cfg->parent) + RD_Cfg *parent_cfg = scan_parents[idx]; + if(preset_cfg != &rd_nil_cfg) { - if(preset_cfg != &rd_nil_cfg) + RD_Cfg *possible_preset_cfg = rd_cfg_child_from_string(parent_cfg, str8_lit("color_preset")); + if(possible_preset_cfg != &rd_nil_cfg) { - RD_Cfg *possible_preset_cfg = rd_cfg_child_from_string(parent_cfg, str8_lit("color_preset")); - if(possible_preset_cfg != &rd_nil_cfg) - { - preset_cfg = possible_preset_cfg; - } + preset_cfg = possible_preset_cfg; } - RD_Cfg *colors_cfg = rd_cfg_child_from_string(parent_cfg, str8_lit("colors")); - if(colors_cfg != &rd_nil_cfg) + } + for(RD_Cfg *child = parent_cfg->first; child != &rd_nil_cfg; child = child->next) + { + if(str8_match(child->string, str8_lit("color"), 0)) { - rd_cfg_list_push_front(scratch.arena, &colors_cfgs, colors_cfg); - } - if(preset_cfg != &rd_nil_cfg && colors_cfg != &rd_nil_cfg) - { - break; + rd_cfg_list_push_front(scratch.arena, &colors_cfgs, child); } } } @@ -5553,7 +5549,7 @@ rd_window_frame(void) for(RD_CfgNode *n = colors_cfgs.first; n != 0; n = n->next) { ThemeTask *t = push_array(scratch.arena, ThemeTask, 1); - SLLQueuePush(first_task, last_task, t); + SLLQueuePushFront(first_task, last_task, t); t->tree = md_tree_from_string(scratch.arena, rd_string_from_cfg_tree(scratch.arena, n->v)); } } @@ -5574,17 +5570,14 @@ rd_window_frame(void) MD_Node *tree_root = t->tree; for(MD_Node *n = tree_root; !md_node_is_nil(n); n = md_node_rec_depth_first_pre(n, tree_root).next) { - if(n->flags & MD_NodeFlag_Numeric && md_node_is_nil(n->first)) + if(str8_match(n->string, str8_lit("color"), 0)) { - U64 color_srgba_u64 = 0; - try_u64_from_str8_c_rules(n->string, &color_srgba_u64); - Vec4F32 color_srgba = rgba_from_u32((U32)color_srgba_u64); - Vec4F32 color_linear = linear_from_srgba(color_srgba); - String8List tags = {0}; - for(MD_Node *parent = n->parent; parent != tree_root && !md_node_is_nil(parent); parent = parent->parent) - { - str8_list_push(scratch.arena, &tags, push_str8_copy(rd_frame_arena(), parent->string)); - } + MD_Node *tags_child = md_child_from_string(n, str8_lit("tags"), 0); + MD_Node *value_child = md_child_from_string(n, str8_lit("value"), 0); + U8 split_char = ' '; + String8List tags = str8_split(scratch.arena, tags_child->first->string, &split_char, 1, 0); + U32 color_u32 = e_value_from_string(value_child->first->string).u32; + Vec4F32 color_linear = linear_from_srgba(rgba_from_u32(color_u32)); ThemePatternNode *node = push_array(scratch.arena, ThemePatternNode, 1); node->pattern.tags = str8_array_from_list(rd_frame_arena(), &tags); node->pattern.linear = color_linear; @@ -15209,8 +15202,22 @@ rd_frame(void) { rd_cfg_release(n->v); } - // String8 color_preset = rd_setting_from_name(str8_lit("color_preset")); - // String8 color_file = rd_setting_from_name(str8_lit("color_file")); + String8 color_preset = rd_setting_from_name(str8_lit("color_preset")); + String8 color_file = rd_setting_from_name(str8_lit("color_file")); + RD_ThemePreset preset = RD_ThemePreset_DefaultDark; + // TODO(rjf): map preset via string + MD_Node *theme_tree = rd_state->theme_preset_trees[preset]; + for(MD_Node *n = theme_tree; !md_node_is_nil(n); n = md_node_rec_depth_first_pre(n, theme_tree).next) + { + if(str8_match(n->string, str8_lit("color"), 0)) + { + RD_Cfg *color = rd_cfg_new(parent, str8_lit("color")); + RD_Cfg *tags = rd_cfg_new(color, str8_lit("tags")); + RD_Cfg *value = rd_cfg_new(color, str8_lit("value")); + rd_cfg_new(tags, md_child_from_string(n, str8_lit("tags"), 0)->first->string); + rd_cfg_new(value, md_child_from_string(n, str8_lit("value"), 0)->first->string); + } + } }break; //- rjf: watches diff --git a/src/raddbg/raddbg_views.c b/src/raddbg/raddbg_views.c index 9f6f31e0..135476df 100644 --- a/src/raddbg/raddbg_views.c +++ b/src/raddbg/raddbg_views.c @@ -3648,10 +3648,11 @@ RD_VIEW_UI_FUNCTION_DEF(color) RD_Font(RD_FontSlot_Code) { UI_Signal sv_sig = ui_sat_val_pickerf(hsva.x, &hsva.y, &hsva.z, "sat_val_picker"); + UI_Signal h_sig = {0}; ui_spacer(ui_em(1.f, 1.f)); UI_PrefWidth(ui_em(3.f, 1.f)) { - UI_Signal h_sig = ui_hue_pickerf(&hsva.x, hsva.y, hsva.z, "hue_picker"); + h_sig = ui_hue_pickerf(&hsva.x, hsva.y, hsva.z, "hue_picker"); } ui_spacer(ui_em(1.f, 1.f)); UI_PrefWidth(ui_children_sum(1)) UI_Column @@ -3690,6 +3691,18 @@ RD_VIEW_UI_FUNCTION_DEF(color) } } } + if(ui_dragging(h_sig) || ui_dragging(sv_sig)) + { + // TODO(rjf): hard-coding U32 committing for now + E_Type *type = e_type_from_key__cached(e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative)); + if(type->kind == E_TypeKind_U32) + { + Vec4F32 new_rgba = rgba_from_hsva(hsva); + U32 u32 = u32_from_rgba(new_rgba); + String8 string = push_str8f(scratch.arena, "0x%x", u32); + rd_commit_eval_value_string(eval, string); + } + } } } diff --git a/src/raddbg/raddbg_widgets.c b/src/raddbg/raddbg_widgets.c index 7d5c8d70..bff716a4 100644 --- a/src/raddbg/raddbg_widgets.c +++ b/src/raddbg/raddbg_widgets.c @@ -397,9 +397,9 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg) if(str8_match(cfg->string, str8_lit("color"), 0)) { String8 tags = rd_cfg_child_from_string(cfg, str8_lit("tags"))->first->string; - String8 color_string = rd_cfg_child_from_string(cfg, str8_lit("color"))->first->string; + String8 color_string = rd_cfg_child_from_string(cfg, str8_lit("value"))->first->string; U32 color_u32 = e_value_from_stringf("(uint32)(%S)", color_string).u32; - Vec4F32 color = rgba_from_u32(color_u32); + Vec4F32 color = linear_from_srgba(rgba_from_u32(color_u32)); if(tags.size != 0) { dr_fstrs_push_new(arena, &result, ¶ms, tags, .color = color);