mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-15 02:30:11 -08:00
color visualizer / theme editing work
This commit is contained in:
1 parent
ddbb2148a4
commit
09372bd7c1
11 files changed
+301
-260
No files matched your search
@@ -961,6 +961,7 @@ e_eval_from_bundle(E_CacheBundle *bundle)
|
||||
E_Eval eval =
|
||||
{
|
||||
.key = bundle->key,
|
||||
.parent_key= bundle->parent_key,
|
||||
.string = bundle->string,
|
||||
.expr = e_parse_from_bundle(bundle).expr,
|
||||
.irtree = e_irtree_from_bundle(bundle),
|
||||
|
||||
@@ -340,6 +340,7 @@ typedef struct E_Eval E_Eval;
|
||||
struct E_Eval
|
||||
{
|
||||
E_Key key;
|
||||
E_Key parent_key;
|
||||
String8 string;
|
||||
E_Expr *expr;
|
||||
E_IRTreeAndType irtree;
|
||||
@@ -993,7 +994,7 @@ read_only global E_String2NumMap e_string2num_map_nil = {0};
|
||||
read_only global E_String2ExprMap e_string2expr_map_nil = {0};
|
||||
read_only global E_Expr e_expr_nil = {&e_expr_nil, &e_expr_nil, &e_expr_nil, &e_expr_nil, &e_expr_nil};
|
||||
read_only global E_IRNode e_irnode_nil = {&e_irnode_nil, &e_irnode_nil, &e_irnode_nil};
|
||||
read_only global E_Eval e_eval_nil = {{0}, {0}, &e_expr_nil, {&e_irnode_nil}};
|
||||
read_only global E_Eval e_eval_nil = {{0}, {0}, {0}, &e_expr_nil, {&e_irnode_nil}};
|
||||
read_only global E_Module e_module_nil = {&rdi_parsed_nil};
|
||||
read_only global E_CacheBundle e_cache_bundle_nil = {0, {0}, {0}, {0}, {{0}, 0, &e_expr_nil, &e_expr_nil}, {&e_irnode_nil}};
|
||||
thread_static E_BaseCtx *e_base_ctx = 0;
|
||||
|
||||
@@ -294,7 +294,7 @@ global read_only EV_Block ev_nil_block =
|
||||
{0},
|
||||
0,
|
||||
{0},
|
||||
{{0}, {0}, &e_expr_nil, &e_irnode_nil},
|
||||
{{0}, {0}, {0}, &e_expr_nil, &e_irnode_nil},
|
||||
{0},
|
||||
&e_type_expand_rule__default,
|
||||
{0},
|
||||
|
||||
@@ -52,7 +52,7 @@ str8_lit_comp(""),
|
||||
str8_lit_comp(""),
|
||||
};
|
||||
|
||||
RD_VocabInfo rd_vocab_info_table[319] =
|
||||
RD_VocabInfo rd_vocab_info_table[322] =
|
||||
{
|
||||
{str8_lit_comp("auto_view_rule"), str8_lit_comp("auto_view_rules"), str8_lit_comp("Auto View Rule"), str8_lit_comp("Auto View Rules"), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
|
||||
@@ -66,6 +66,7 @@ RD_VocabInfo rd_vocab_info_table[319] =
|
||||
{str8_lit_comp("address_location"), str8_lit_comp("address_locations"), str8_lit_comp("Address Location"), str8_lit_comp("Address Locations"), RD_IconKind_Null},
|
||||
{str8_lit_comp("target"), str8_lit_comp("targets"), str8_lit_comp("Target"), str8_lit_comp("Targets"), RD_IconKind_Target},
|
||||
{str8_lit_comp("color"), str8_lit_comp("colors"), str8_lit_comp("Color"), str8_lit_comp("Colors"), RD_IconKind_Palette},
|
||||
{str8_lit_comp("theme_color"), str8_lit_comp("theme_colors"), str8_lit_comp("Theme Color"), str8_lit_comp("Theme Colors"), RD_IconKind_Palette},
|
||||
{str8_lit_comp("executable"), str8_lit_comp("executables"), str8_lit_comp("Executable"), str8_lit_comp("Executables"), RD_IconKind_Module},
|
||||
{str8_lit_comp("arguments"), str8_lit_comp("arguments"), str8_lit_comp("Arguments"), str8_lit_comp("Arguments"), RD_IconKind_Null},
|
||||
{str8_lit_comp("exe"), str8_lit_comp("exes"), str8_lit_comp("Executable"), str8_lit_comp("Executables"), RD_IconKind_Module},
|
||||
@@ -333,8 +334,10 @@ RD_VocabInfo rd_vocab_info_table[319] =
|
||||
{str8_lit_comp("add_watch_pin"), str8_lit_comp(""), str8_lit_comp("Add Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||
{str8_lit_comp("toggle_watch_pin"), str8_lit_comp(""), str8_lit_comp("Toggle Watch Pin"), str8_lit_comp(""), RD_IconKind_Pin},
|
||||
{str8_lit_comp("add_auto_view_rule"), str8_lit_comp(""), str8_lit_comp("Add Auto View Rule"), str8_lit_comp(""), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("add_color"), str8_lit_comp(""), str8_lit_comp("Add Color"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
{str8_lit_comp("import_colors"), str8_lit_comp(""), str8_lit_comp("Import Colors"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
{str8_lit_comp("open_theme"), str8_lit_comp(""), str8_lit_comp("Open Theme"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
{str8_lit_comp("add_theme_color"), str8_lit_comp(""), str8_lit_comp("Add Theme Color"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
{str8_lit_comp("fork_loaded_theme_colors"), str8_lit_comp(""), str8_lit_comp("Fork Loaded Theme Colors"), str8_lit_comp(""), RD_IconKind_Palette},
|
||||
{str8_lit_comp("save_theme_colors"), str8_lit_comp(""), str8_lit_comp("Save Theme Colors"), str8_lit_comp(""), RD_IconKind_Save},
|
||||
{str8_lit_comp("set_next_statement"), str8_lit_comp(""), str8_lit_comp("Set Next Statement"), str8_lit_comp(""), RD_IconKind_RightArrow},
|
||||
{str8_lit_comp("add_target"), str8_lit_comp(""), str8_lit_comp("Add Target"), str8_lit_comp(""), RD_IconKind_Target},
|
||||
{str8_lit_comp("select_target"), str8_lit_comp(""), str8_lit_comp("Select Target"), str8_lit_comp(""), RD_IconKind_Target},
|
||||
@@ -375,11 +378,11 @@ RD_VocabInfo rd_vocab_info_table[319] =
|
||||
{str8_lit_comp("memory"), str8_lit_comp(""), str8_lit_comp("Memory"), str8_lit_comp(""), RD_IconKind_Grid},
|
||||
};
|
||||
|
||||
RD_NameSchemaInfo rd_name_schema_info_table[22] =
|
||||
RD_NameSchemaInfo rd_name_schema_info_table[23] =
|
||||
{
|
||||
{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 @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: 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("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 @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('Theme Preset') @description(\"The selected built-in theme preset.\")\n 'theme_preset': string,\n @no_expand @display_name('Theme File') @description(\"The path from which theme data is loaded, overriding the preset.\")\n 'theme_file': path,\n @display_name('Theme Colors') @description(\"Additional theme colors which are applied on top of the theme file or preset.\")\n 'theme_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_Line truncated
|
||||
{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("theme_color"), str8_lit_comp("@collection_commands(add_theme_color, fork_loaded_theme_colors, save_theme_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")},
|
||||
@@ -387,6 +390,7 @@ RD_NameSchemaInfo rd_name_schema_info_table[22] =
|
||||
{str8_lit_comp("disasm"), str8_lit_comp("@inherit(tab) x:\n{\n @description(\"An expression to describe the base address or offset of the disassembly.\")\n 'expression': code_string,\n 'arch': arch,\n 'syntax': dasm_syntax,\n 'size': code_string,\n @default(1) @description(\"Controls whether or not addresses are shown in the disassembly text.\")\n 'show_addresses': bool,\n @default(0) @description(\"Controls whether or not code bytes are shown in the disassembly text.\")\n 'show_code_bytes': bool,\n @default(1) @description(\"Controls whether or not source lines, corresponding to disassembly instruction ranges, are shown in the disassembly text.\")\n 'show_source_lines': bool,\n @default(1) @description(\"Controls whether or not disassembly text is decorated with symbol names.\")\n 'show_symbol_names': bool,\n @default(1) @description(\"Controls whether or not line numbers are shown.\")\n 'show_line_numbers': bool,\n}\n")},
|
||||
{str8_lit_comp("memory"), str8_lit_comp("@inherit(tab) x:\n{\n @description(\"An expression to describe the base address or offset of the memory view.\")\n 'expression': code_string,\n @description(\"The number of bytes of the viewed memory range.\")\n 'size': code_string,\n @default(16) @description(\"The number of columns to build before building new rows.\")\n 'num_columns': @range[1, 64] u64,\n @default(1) @description(\"The number of bytes that each cell should represent.\")\n 'bytes_per_cell': @range[1, 8] u64,\n}\n")},
|
||||
{str8_lit_comp("bitmap"), str8_lit_comp("@inherit(tab) x:\n{\n @display_name(\"Base Pointer\") @description(\"An expression to describe the base address or offset of the bitmap data.\")\n 'expression': code_string,\n @order(0) 'w': u64,\n @order(1) 'h': u64,\n @display_name(\"Bitmap Format\") @description(\"The pixel format that the bitmap data should be interpreted as being within.\")\n 'fmt': tex2dformat,\n}\n")},
|
||||
{str8_lit_comp("color"), str8_lit_comp("@inherit(tab) x:\n{\n @display_name(\"Value\") @description(\"An expression to describe the value or location of the color.\")\n 'expression': code_string,\n}\n")},
|
||||
{str8_lit_comp("geo3d"), str8_lit_comp("@inherit(tab) x:\n{\n 'count': code_string,\n 'vtx': code_string,\n 'vtx_size': code_string,\n 'yaw': @range[0, 1] f32,\n 'pitch': @range[-0.5, 0] f32,\n 'zoom': @range[0, 100] f32,\n}\n")},
|
||||
{str8_lit_comp("target"), str8_lit_comp("@row_commands(enable_cfg, launch_and_run, launch_and_step_into, duplicate_cfg, remove_cfg)\n@collection_commands(add_target)\nx:\n{\n 'label': code_string,\n 'executable': path,\n 'arguments': string,\n 'working_directory': path,\n 'entry_point': code_string,\n 'stdout_path': path,\n 'stderr_path': path,\n 'stdin_path': path,\n 'environment': query,\n 'debug_subprocesses': bool,\n @no_expand @default(0) 'enabled': bool,\n}\n")},
|
||||
{str8_lit_comp("breakpoint"), str8_lit_comp("@row_commands(enable_cfg, duplicate_cfg, remove_cfg)\n@collection_commands(toggle_breakpoint, add_breakpoint, add_address_breakpoint)\nx:\n{\n 'label': code_string,\n 'condition': code_string,\n 'source_location': string,\n 'address_location': code_string,\n 'hit_count': u64,\n 'address_range_size': @or(0, 1, 2, 4, 8) u64,\n 'break_on_write': bool,\n 'break_on_read': bool,\n 'break_on_execute': bool,\n @no_expand @default(1) 'enabled': bool,\n}\n")},
|
||||
@@ -448,7 +452,7 @@ Rng1U64 rd_reg_slot_range_table[43] =
|
||||
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
|
||||
};
|
||||
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[214] =
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[216] =
|
||||
{
|
||||
{0},
|
||||
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -624,8 +628,10 @@ RD_CmdKindInfo rd_cmd_kind_info_table[214] =
|
||||
{ str8_lit_comp("add_watch_pin"), str8_lit_comp("Places a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp("$watch_pins,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("toggle_watch_pin"), str8_lit_comp("Places or removes a watch pin at a given location (file path and line number or address)."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*1)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Expr, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_auto_view_rule"), str8_lit_comp("Adds a new auto view rule."), str8_lit_comp(""), str8_lit_comp("$auto_view_rules,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_String, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_color"), str8_lit_comp("Adds a new color."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("import_colors"), str8_lit_comp("Imports all colors from a loaded color theme file or color theme preset."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_theme"), str8_lit_comp("Opens a theme file."), str8_lit_comp("color"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_theme_color"), str8_lit_comp("Adds a new theme color."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("fork_loaded_theme_colors"), str8_lit_comp("Imports all colors from a loaded color theme file or color theme preset, so they can be individually edited."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("save_theme_colors"), str8_lit_comp("Saves all theme colors to a new theme file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_next_statement"), str8_lit_comp("Sets the selected thread's instruction pointer to the cursor's position."), str8_lit_comp(""), str8_lit_comp("$text_pt,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*1)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("add_target"), str8_lit_comp("Adds a new target."), str8_lit_comp("application,executable,debug"), str8_lit_comp("$targets,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("select_target"), str8_lit_comp("Selects a target."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -910,7 +916,7 @@ str8_lit_comp("far_manager"),
|
||||
|
||||
String8 rd_theme_preset_cfg_string_table[9] =
|
||||
{
|
||||
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: {tagLine truncated
|
||||
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:\"bad text\", value: 0xcf5242ff }\n theme_color: {tags:\"hover\", value: 0xffffffff }\n theme_color: {tags:\"focus\", value: 0xfda200ff }\n theme_color: {tags:\"cursor\", value: 0x8aff00ff }\n theme_color: {tags:\"selection\", value: 0x99ccffff }\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: 0x31393d5f }\n theme_color: {tags:\"floating border\", value: 0xbfbfbf1f }\n theme_color: {tags:\"floating scroll_bar background\", value:Line truncated
|
||||
str8_lit_comp(""),
|
||||
str8_lit_comp("theme:\n{\n background: 0x1b0000ff,\n}\n"),
|
||||
str8_lit_comp(""),
|
||||
|
||||
@@ -230,8 +230,10 @@ RD_CmdKind_DisableBreakpoint,
|
||||
RD_CmdKind_AddWatchPin,
|
||||
RD_CmdKind_ToggleWatchPin,
|
||||
RD_CmdKind_AddAutoViewRule,
|
||||
RD_CmdKind_AddColor,
|
||||
RD_CmdKind_ImportColors,
|
||||
RD_CmdKind_OpenTheme,
|
||||
RD_CmdKind_AddThemeColor,
|
||||
RD_CmdKind_ForkLoadedThemeColors,
|
||||
RD_CmdKind_SaveThemeColors,
|
||||
RD_CmdKind_SetNextStatement,
|
||||
RD_CmdKind_AddTarget,
|
||||
RD_CmdKind_SelectTarget,
|
||||
@@ -673,8 +675,8 @@ Z(getting_started)\
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 rd_tab_fast_path_view_name_table[20];
|
||||
extern String8 rd_tab_fast_path_query_name_table[20];
|
||||
extern RD_VocabInfo rd_vocab_info_table[319];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[22];
|
||||
extern RD_VocabInfo rd_vocab_info_table[322];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[23];
|
||||
extern Rng1U64 rd_reg_slot_range_table[43];
|
||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
extern String8 rd_binding_version_remap_new_name_table[8];
|
||||
|
||||
+103
-90
@@ -91,6 +91,7 @@ RD_VocabTable:
|
||||
{address_location _ "Address Location" _ Null }
|
||||
{target _ "Target" _ Target }
|
||||
{color _ "Color" _ Palette }
|
||||
{theme_color _ "Theme Color" _ Palette }
|
||||
{executable _ "Executable" _ Module }
|
||||
{arguments arguments "Arguments" "Arguments" Null }
|
||||
{exe exes "Executable" _ Module }
|
||||
@@ -230,13 +231,13 @@ RD_VocabTable:
|
||||
@display_name('Code Font') @description("The name of, or path to, the font used when displaying code.")
|
||||
'code_font': string,
|
||||
|
||||
//- rjf: colors
|
||||
@display_name('Color Preset')
|
||||
'color_preset': string,
|
||||
@display_name('Color File')
|
||||
'color_file': path,
|
||||
@display_name('Colors')
|
||||
'colors': query,
|
||||
//- rjf: theme
|
||||
@display_name('Theme Preset') @description("The selected built-in theme preset.")
|
||||
'theme_preset': string,
|
||||
@no_expand @display_name('Theme File') @description("The path from which theme data is loaded, overriding the preset.")
|
||||
'theme_file': path,
|
||||
@display_name('Theme Colors') @description("Additional theme colors which are applied on top of the theme file or preset.")
|
||||
'theme_colors': query,
|
||||
|
||||
//- rjf: thread & breakpoint decorations
|
||||
@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.")
|
||||
@@ -357,11 +358,11 @@ RD_VocabTable:
|
||||
```
|
||||
}
|
||||
|
||||
//- rjf: colors
|
||||
//- rjf: theme colors
|
||||
{
|
||||
color,
|
||||
theme_color,
|
||||
```
|
||||
@collection_commands(add_color, import_colors) x:
|
||||
@collection_commands(add_theme_color, fork_loaded_theme_colors, save_theme_colors) x:
|
||||
{
|
||||
@display_name('Tags') tags: string,
|
||||
@display_name('Value') value: @color @hex u32,
|
||||
@@ -492,6 +493,16 @@ RD_VocabTable:
|
||||
}
|
||||
```
|
||||
}
|
||||
{
|
||||
color,
|
||||
```
|
||||
@inherit(tab) x:
|
||||
{
|
||||
@display_name("Value") @description("An expression to describe the value or location of the color.")
|
||||
'expression': code_string,
|
||||
}
|
||||
```
|
||||
}
|
||||
{
|
||||
geo3d,
|
||||
```
|
||||
@@ -920,9 +931,11 @@ RD_CmdTable: // | | | |
|
||||
//- rjf: auto view rule
|
||||
{AddAutoViewRule 1 1 0 0 "" String null Nil Null 0 0 0 0 0 0 0 Binoculars "add_auto_view_rule" "Add Auto View Rule" "Adds a new auto view rule." "" "$auto_view_rules," }
|
||||
|
||||
//- rjf: colors
|
||||
{AddColor 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Palette "add_color" "Add Color" "Adds a new color." "" "" }
|
||||
{ImportColors 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Palette "import_colors" "Import Colors" "Imports all colors from a loaded color theme file or color theme preset." "" "" }
|
||||
//- rjf: themes
|
||||
{OpenTheme 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Palette "open_theme" "Open Theme" "Opens a theme file." "color" "" }
|
||||
{AddThemeColor 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Palette "add_theme_color" "Add Theme Color" "Adds a new theme color." "" "" }
|
||||
{ForkLoadedThemeColors 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Palette "fork_loaded_theme_colors" "Fork Loaded Theme Colors" "Imports all colors from a loaded color theme file or color theme preset, so they can be individually edited." "" "" }
|
||||
{SaveThemeColors 0 0 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Save "save_theme_colors" "Save Theme Colors" "Saves all theme colors to a new theme file." "" "" }
|
||||
|
||||
//- rjf: line operations
|
||||
{SetNextStatement 1 1 1 0 "" Null null Nil Null 0 0 0 0 0 0 0 RightArrow "set_next_statement" "Set Next Statement" "Sets the selected thread's instruction pointer to the cursor's position." "" "$text_pt," }
|
||||
@@ -1302,83 +1315,83 @@ RD_ThemePresetTable:
|
||||
DefaultDark default_dark "Default (Dark)",
|
||||
```theme:
|
||||
{
|
||||
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 }
|
||||
theme_color: {tags:"background", value: 0x1b1b1bff }
|
||||
theme_color: {tags:"alt background", value: 0x222222ff }
|
||||
theme_color: {tags:"pop background", value: 0x355b6eff }
|
||||
theme_color: {tags:"fresh background", value: 0x31393dff }
|
||||
theme_color: {tags:"match background", value: 0x31393dff }
|
||||
theme_color: {tags:"border", value: 0x404040ff }
|
||||
theme_color: {tags:"text", value: 0xe5e5e5ff }
|
||||
theme_color: {tags:"weak text", value: 0xa4a4a4ff }
|
||||
theme_color: {tags:"good text", value: 0x32a852ff }
|
||||
theme_color: {tags:"bad text", value: 0xcf5242ff }
|
||||
theme_color: {tags:"hover", value: 0xffffffff }
|
||||
theme_color: {tags:"focus", value: 0xfda200ff }
|
||||
theme_color: {tags:"cursor", value: 0x8aff00ff }
|
||||
theme_color: {tags:"selection", value: 0x99ccffff }
|
||||
theme_color: {tags:"inactive background", value: 0x0000002f }
|
||||
theme_color: {tags:"drop_shadow", value: 0x0000007f }
|
||||
theme_color: {tags:"good_pop background", value: 0x2c5b36ff }
|
||||
theme_color: {tags:"good_pop border", value: 0x568761ff }
|
||||
theme_color: {tags:"good_pop hover", value: 0xe3f5d3ff }
|
||||
theme_color: {tags:"good_pop weak text", value: 0xe3f5d3ff }
|
||||
theme_color: {tags:"bad_pop background", value: 0x803425ff }
|
||||
theme_color: {tags:"bad_pop hover", value: 0xff825cff }
|
||||
theme_color: {tags:"code_default", value: 0xcbcbcbff }
|
||||
theme_color: {tags:"code_symbol", value: 0x42a2cfff }
|
||||
theme_color: {tags:"code_type", value: 0xfec746ff }
|
||||
theme_color: {tags:"code_local", value: 0x98bc80ff }
|
||||
theme_color: {tags:"code_register", value: 0xb7afd5ff }
|
||||
theme_color: {tags:"code_keyword", value: 0xb38d4cff }
|
||||
theme_color: {tags:"code_delimiter_or_operator", value: 0x767676ff }
|
||||
theme_color: {tags:"code_numeric", value: 0x98abb1ff }
|
||||
theme_color: {tags:"code_numeric_alt_digit_group", value: 0x738287ff }
|
||||
theme_color: {tags:"code_string", value: 0x98abb1ff }
|
||||
theme_color: {tags:"code_meta", value: 0xd96759ff }
|
||||
theme_color: {tags:"code_comment", value: 0x717171ff }
|
||||
theme_color: {tags:"line_info_0", value: 0x4f3022ff }
|
||||
theme_color: {tags:"line_info_1", value: 0x4f3e15ff }
|
||||
theme_color: {tags:"line_info_2", value: 0x434e2aff }
|
||||
theme_color: {tags:"line_info_3", value: 0x36241fff }
|
||||
theme_color: {tags:"line_info_4", value: 0x4f3022ff }
|
||||
theme_color: {tags:"line_info_5", value: 0x4f3e15ff }
|
||||
theme_color: {tags:"line_info_6", value: 0x434e2aff }
|
||||
theme_color: {tags:"line_info_7", value: 0x36241fff }
|
||||
theme_color: {tags:"thread_0", value: 0xffcb7fff }
|
||||
theme_color: {tags:"thread_1", value: 0xb2ff65ff }
|
||||
theme_color: {tags:"thread_2", value: 0xff99e5ff }
|
||||
theme_color: {tags:"thread_3", value: 0x6598ffff }
|
||||
theme_color: {tags:"thread_4", value: 0x65ffcbff }
|
||||
theme_color: {tags:"thread_5", value: 0xff9819ff }
|
||||
theme_color: {tags:"thread_6", value: 0x9932ffff }
|
||||
theme_color: {tags:"thread_7", value: 0x65ff4cff }
|
||||
theme_color: {tags:"thread_unwound", value: 0xb2ccd8ff }
|
||||
theme_color: {tags:"thread_error", value: 0xb23219ff }
|
||||
theme_color: {tags:"breakpoint", value: 0xa72911ff }
|
||||
theme_color: {tags:"floating background", value: 0x1b1b1baf }
|
||||
theme_color: {tags:"floating background alt", value: 0x0000005f }
|
||||
theme_color: {tags:"floating background fresh", value: 0x31393d5f }
|
||||
theme_color: {tags:"floating border", value: 0xbfbfbf1f }
|
||||
theme_color: {tags:"floating scroll_bar background", value: 0x3b3b3b5f }
|
||||
theme_color: {tags:"floating scroll_bar border", value: 0x5f5f5f5f }
|
||||
theme_color: {tags:"menu_bar background", value: 0x2b3740ff }
|
||||
theme_color: {tags:"menu_bar border", value: 0x3e4c57ff }
|
||||
theme_color: {tags:"scroll_bar background", value: 0x2b2b2bff }
|
||||
theme_color: {tags:"scroll_bar border", value: 0x3f3f3fff }
|
||||
theme_color: {tags:"implicit background", value: 0x00000000 }
|
||||
theme_color: {tags:"implicit border", value: 0x00000000 }
|
||||
theme_color: {tags:"hollow background", value: 0x00000000 }
|
||||
theme_color: {tags:"hollow border", value: 0xffffff1f }
|
||||
theme_color: {tags:"tab background", value: 0x6f5135ff }
|
||||
theme_color: {tags:"tab border", value: 0x8a6e54ff }
|
||||
theme_color: {tags:"tab inactive background", value: 0x2b3740ff }
|
||||
theme_color: {tags:"tab inactive border", value: 0x3e4c57ff }
|
||||
theme_color: {tags:"tab auto background", value: 0x693847ff }
|
||||
theme_color: {tags:"tab auto border", value: 0x9e6274ff }
|
||||
theme_color: {tags:"tab auto inactive background", value: 0x2f2633ff }
|
||||
theme_color: {tags:"tab auto inactive border", value: 0x685073ff }
|
||||
theme_color: {tags:"drop_site background", value: 0xffffff05 }
|
||||
theme_color: {tags:"drop_site border", value: 0xffffff0f }
|
||||
}
|
||||
```
|
||||
}
|
||||
|
||||
+47
-33
@@ -2326,24 +2326,27 @@ rd_view_from_eval(RD_Cfg *parent, E_Eval eval)
|
||||
RD_Cfg *view = rd_cfg_child_from_string_or_alloc(parent, schema_name);
|
||||
rd_cfg_child_from_string_or_alloc(view, str8_lit("selected"));
|
||||
{
|
||||
MD_NodePtrList schemas = rd_schemas_from_name(schema_name);
|
||||
|
||||
E_Expr *primary_expr = eval.expr;
|
||||
E_Expr **args = 0;
|
||||
U64 args_count = 0;
|
||||
// rjf: get expression evaluation
|
||||
E_Eval expr_eval = eval;
|
||||
if(eval.expr->kind == E_ExprKind_Call)
|
||||
{
|
||||
primary_expr = eval.expr->first->next;
|
||||
expr_eval = e_eval_from_expr(eval.expr->first->next);
|
||||
}
|
||||
|
||||
// rjf: get arguments to view
|
||||
E_Expr **args = 0;
|
||||
U64 args_count = 0;
|
||||
if(type->args != 0)
|
||||
{
|
||||
args = type->args;
|
||||
args_count = type->count;
|
||||
}
|
||||
E_Eval primary_eval = e_eval_from_expr(primary_expr);
|
||||
|
||||
// rjf: reflect expr & arguments in cfg tree
|
||||
RD_Cfg *expr_root = rd_cfg_child_from_string_or_alloc(view, str8_lit("expression"));
|
||||
rd_cfg_new_replace(expr_root, e_full_expr_string_from_key(scratch.arena, primary_eval.key));
|
||||
rd_cfg_new_replace(expr_root, e_full_expr_string_from_key(scratch.arena, expr_eval.key));
|
||||
{
|
||||
MD_NodePtrList schemas = rd_schemas_from_name(schema_name);
|
||||
U64 unnamed_order_idx = 0;
|
||||
for EachIndex(arg_idx, args_count)
|
||||
{
|
||||
@@ -3284,13 +3287,17 @@ rd_view_ui(Rng2F32 rect)
|
||||
}
|
||||
else if(e_type_kind_from_key(e_type_key_unwrap(eval.irtree.type_key, E_TypeUnwrapFlag_AllDecorative)) == E_TypeKind_Set)
|
||||
{
|
||||
rd_cmd(RD_CmdKind_PushQuery, .expr = e_string_from_expr(scratch.arena, eval.expr, str8_zero()));
|
||||
rd_cmd(RD_CmdKind_PushQuery, .expr = e_full_expr_string_from_key(scratch.arena, eval.key));
|
||||
}
|
||||
else
|
||||
{
|
||||
did_cmd = 0;
|
||||
}
|
||||
}break;
|
||||
case RD_EvalSpaceKind_MetaQuery:
|
||||
{
|
||||
rd_cmd(RD_CmdKind_PushQuery, .expr = e_full_expr_string_from_key(scratch.arena, eval.key));
|
||||
}break;
|
||||
case RD_EvalSpaceKind_MetaUnattachedProcess:
|
||||
{
|
||||
U64 pid = eval.value.u128.u64[0];
|
||||
@@ -4496,14 +4503,14 @@ rd_view_ui(Rng2F32 rect)
|
||||
UI_Flags(0)
|
||||
{
|
||||
// rjf: 'pull out' button
|
||||
UI_TagF(".") UI_TagF("tab") UI_Rect(r2f32p(ui_top_font_size()*1.5f,
|
||||
ui_top_font_size()*1.5f,
|
||||
ui_top_font_size()*1.5f + ui_top_font_size()*3.f,
|
||||
ui_top_font_size()*1.5f + ui_top_font_size()*3.f))
|
||||
UI_CornerRadius(ui_top_font_size()*1.5f)
|
||||
UI_TagF(".") UI_TagF("tab") UI_Rect(r2f32p(floor_f32(ui_top_font_size()*1.5f),
|
||||
floor_f32(ui_top_font_size()*1.5f),
|
||||
floor_f32(ui_top_font_size()*1.5f + ui_top_font_size()*3.f),
|
||||
floor_f32(ui_top_font_size()*1.5f + ui_top_font_size()*3.f)))
|
||||
UI_CornerRadius(floor_f32(ui_top_font_size()*1.5f))
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
RD_Font(RD_FontSlot_Icons)
|
||||
UI_FontSize(ui_top_font_size()*0.8f)
|
||||
UI_FontSize(floor_f32(ui_top_font_size()*0.9f))
|
||||
{
|
||||
UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_Clickable|
|
||||
UI_BoxFlag_Floating|
|
||||
@@ -4786,6 +4793,8 @@ rd_view_ui(Rng2F32 rect)
|
||||
// rjf: has a command name? -> push command
|
||||
else if(cell_info.cmd_name.size != 0)
|
||||
{
|
||||
String8 cmd_name = cell_info.cmd_name;
|
||||
RD_CmdKindInfo *cmd_kind_info = rd_cmd_kind_info_from_string(cmd_name);
|
||||
CTRL_Entity *entity = rd_ctrl_entity_from_eval_space(row->eval.space);
|
||||
RD_Cfg *cfg = rd_cfg_from_eval_space(row->eval.space);
|
||||
if(cfg == &rd_nil_cfg)
|
||||
@@ -4794,13 +4803,13 @@ rd_view_ui(Rng2F32 rect)
|
||||
}
|
||||
RD_RegsScope(.cfg = cfg->id, .ctrl_entity = entity->handle)
|
||||
{
|
||||
if(cfg != &rd_nil_cfg || entity != &ctrl_entity_nil)
|
||||
if(!(cmd_kind_info->query.flags & RD_QueryFlag_Required))
|
||||
{
|
||||
rd_push_cmd(cell_info.cmd_name, rd_regs());
|
||||
}
|
||||
else
|
||||
{
|
||||
rd_cmd(RD_CmdKind_RunCommand, .cmd_name = cell_info.cmd_name);
|
||||
rd_cmd(RD_CmdKind_RunCommand, .cmd_name = cmd_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5548,7 +5557,7 @@ rd_window_frame(void)
|
||||
}
|
||||
for(RD_Cfg *child = parent_cfg->first; child != &rd_nil_cfg; child = child->next)
|
||||
{
|
||||
if(str8_match(child->string, str8_lit("color"), 0))
|
||||
if(str8_match(child->string, str8_lit("theme_color"), 0))
|
||||
{
|
||||
rd_cfg_list_push_front(scratch.arena, &colors_cfgs, child);
|
||||
}
|
||||
@@ -5606,7 +5615,7 @@ 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(str8_match(n->string, str8_lit("color"), 0))
|
||||
if(str8_match(n->string, str8_lit("theme_color"), 0))
|
||||
{
|
||||
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);
|
||||
@@ -11638,8 +11647,8 @@ rd_frame(void)
|
||||
RD_Theme *theme_srgba = push_array(scratch.arena, RD_Theme, 1);
|
||||
|
||||
//- rjf: gather globally-applying config options
|
||||
RD_CfgList preset_roots = rd_cfg_top_level_list_from_string(scratch.arena, str8_lit("color_preset"));
|
||||
RD_CfgList colors_roots = rd_cfg_top_level_list_from_string(scratch.arena, str8_lit("colors"));
|
||||
RD_CfgList preset_roots = rd_cfg_top_level_list_from_string(scratch.arena, str8_lit("theme_preset"));
|
||||
RD_CfgList colors_roots = rd_cfg_top_level_list_from_string(scratch.arena, str8_lit("theme_colors"));
|
||||
|
||||
//- rjf: assume default-dark
|
||||
MemoryCopy(theme_srgba->colors, rd_theme_preset_colors_table[RD_ThemePreset_DefaultDark], sizeof(rd_theme_preset_colors__default_dark));
|
||||
@@ -12349,10 +12358,9 @@ rd_frame(void)
|
||||
{
|
||||
.info = E_TYPE_EXPAND_INFO_FUNCTION_NAME(call_stack),
|
||||
}));
|
||||
e_string2typekey_map_insert(rd_frame_arena(), rd_state->meta_name2type_map, str8_lit("colors"),
|
||||
e_string2typekey_map_insert(rd_frame_arena(), rd_state->meta_name2type_map, str8_lit("theme_colors"),
|
||||
e_type_key_cons(.kind = E_TypeKind_Set,
|
||||
.flags = E_TypeFlag_EditableChildren,
|
||||
.name = str8_lit("colors"),
|
||||
.name = str8_lit("theme_colors"),
|
||||
.irext = E_TYPE_IREXT_FUNCTION_NAME(cfgs_slice),
|
||||
.access = E_TYPE_ACCESS_FUNCTION_NAME(cfgs_slice),
|
||||
.expand =
|
||||
@@ -15227,33 +15235,39 @@ rd_frame(void)
|
||||
rd_cfg_new(project, str8_lit("auto_view_rule"));
|
||||
}break;
|
||||
|
||||
//- rjf: colors
|
||||
case RD_CmdKind_AddColor:
|
||||
//- rjf: themes
|
||||
case RD_CmdKind_OpenTheme:
|
||||
{
|
||||
RD_Cfg *user = rd_cfg_child_from_string(rd_state->root_cfg, str8_lit("user"));
|
||||
RD_Cfg *theme_file = rd_cfg_child_from_string_or_alloc(user, str8_lit("theme_file"));
|
||||
rd_cfg_new_replace(theme_file, rd_regs()->file_path);
|
||||
}break;
|
||||
case RD_CmdKind_AddThemeColor:
|
||||
{
|
||||
RD_Cfg *parent = rd_cfg_from_id(rd_regs()->cfg);
|
||||
RD_Cfg *color = rd_cfg_new(parent, str8_lit("color"));
|
||||
RD_Cfg *color = rd_cfg_new(parent, str8_lit("theme_color"));
|
||||
rd_cfg_new(color, str8_lit("tags"));
|
||||
RD_Cfg *value = rd_cfg_new(color, str8_lit("value"));
|
||||
rd_cfg_new(value, str8_lit("0xffffffff"));
|
||||
}break;
|
||||
case RD_CmdKind_ImportColors:
|
||||
case RD_CmdKind_ForkLoadedThemeColors:
|
||||
{
|
||||
RD_Cfg *parent = rd_cfg_from_id(rd_regs()->cfg);
|
||||
RD_CfgList colors = rd_cfg_child_list_from_string(scratch.arena, parent, str8_lit("color"));
|
||||
RD_CfgList colors = rd_cfg_child_list_from_string(scratch.arena, parent, str8_lit("theme_color"));
|
||||
for(RD_CfgNode *n = colors.first; n != 0; n = n->next)
|
||||
{
|
||||
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("theme_preset"));
|
||||
String8 color_file = rd_setting_from_name(str8_lit("theme_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))
|
||||
if(str8_match(n->string, str8_lit("theme_color"), 0))
|
||||
{
|
||||
RD_Cfg *color = rd_cfg_new(parent, str8_lit("color"));
|
||||
RD_Cfg *color = rd_cfg_new(parent, str8_lit("theme_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);
|
||||
|
||||
@@ -188,10 +188,6 @@
|
||||
// [ ] config hot-reloading, using cfg wins
|
||||
// [ ] undo/redo, using cfg wins
|
||||
// [ ] back/forward, using cfg wins
|
||||
// [ ] autocompletion lister, file lister, function lister, command lister,
|
||||
// etc., all need to be merged, and optionally contextualized/filtered.
|
||||
// right-clicking a tab should be equivalent to spawning a command lister,
|
||||
// but only with commands that are directly
|
||||
//
|
||||
// [ ] crash bug, release mode - filter globals view (try with debugging raddbg, typing `dev` in globals view)
|
||||
//
|
||||
@@ -463,6 +459,10 @@
|
||||
// since that's not normally how Windows fonts work.
|
||||
// [x] I had to go into the user file to change the font. That should probably
|
||||
// be in the theme window?
|
||||
// [x] autocompletion lister, file lister, function lister, command lister,
|
||||
// etc., all need to be merged, and optionally contextualized/filtered.
|
||||
// right-clicking a tab should be equivalent to spawning a command lister,
|
||||
// but only with commands that are directly
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Build Options
|
||||
|
||||
+78
-96
@@ -3485,8 +3485,11 @@ rd_eval_color_from_eval(E_Eval eval)
|
||||
{
|
||||
default:{}break;
|
||||
|
||||
// rjf: leaf u32 -> take all 4 components
|
||||
// rjf: leaf >u32/s32 -> take all 4 components
|
||||
case E_TypeKind_U32:
|
||||
case E_TypeKind_S32:
|
||||
case E_TypeKind_U64:
|
||||
case E_TypeKind_S64:
|
||||
{
|
||||
component_evals[0] = e_value_eval_from_eval(e_eval_wrapf(t->eval, "(float32)(($ & 0xff000000) >> 24) / 255.f"));
|
||||
component_evals[1] = e_value_eval_from_eval(e_eval_wrapf(t->eval, "(float32)(($ & 0x00ff0000) >> 16) / 255.f"));
|
||||
@@ -3521,40 +3524,42 @@ rd_eval_color_from_eval(E_Eval eval)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(lens_type->kind == E_TypeKind_Lens)
|
||||
String8 format_string = str8_lit("rgba");
|
||||
if(lens_type->kind == E_TypeKind_Lens && lens_type->count > 0)
|
||||
{
|
||||
if(lens_type->count < 1 || str8_match(lens_type->args[0]->string, str8_lit("rgba"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[0];
|
||||
result.rgba_evals[1] = component_evals[1];
|
||||
result.rgba_evals[2] = component_evals[2];
|
||||
result.rgba_evals[3] = component_evals[3];
|
||||
}
|
||||
else if(str8_match(lens_type->args[0]->string, str8_lit("argb"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[1];
|
||||
result.rgba_evals[1] = component_evals[2];
|
||||
result.rgba_evals[2] = component_evals[3];
|
||||
result.rgba_evals[3] = component_evals[0];
|
||||
}
|
||||
else if(str8_match(lens_type->args[0]->string, str8_lit("bgra"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[2];
|
||||
result.rgba_evals[1] = component_evals[1];
|
||||
result.rgba_evals[2] = component_evals[0];
|
||||
result.rgba_evals[3] = component_evals[3];
|
||||
}
|
||||
else if(str8_match(lens_type->args[0]->string, str8_lit("abgr"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[3];
|
||||
result.rgba_evals[1] = component_evals[2];
|
||||
result.rgba_evals[2] = component_evals[1];
|
||||
result.rgba_evals[3] = component_evals[0];
|
||||
}
|
||||
for EachIndex(idx, 4)
|
||||
{
|
||||
result.rgba.v[idx] = e_value_eval_from_eval(result.rgba_evals[idx]).value.f32;
|
||||
}
|
||||
format_string = lens_type->args[0]->string;
|
||||
}
|
||||
if(str8_match(format_string, str8_lit("rgba"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[0];
|
||||
result.rgba_evals[1] = component_evals[1];
|
||||
result.rgba_evals[2] = component_evals[2];
|
||||
result.rgba_evals[3] = component_evals[3];
|
||||
}
|
||||
else if(str8_match(format_string, str8_lit("argb"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[1];
|
||||
result.rgba_evals[1] = component_evals[2];
|
||||
result.rgba_evals[2] = component_evals[3];
|
||||
result.rgba_evals[3] = component_evals[0];
|
||||
}
|
||||
else if(str8_match(format_string, str8_lit("bgra"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[2];
|
||||
result.rgba_evals[1] = component_evals[1];
|
||||
result.rgba_evals[2] = component_evals[0];
|
||||
result.rgba_evals[3] = component_evals[3];
|
||||
}
|
||||
else if(str8_match(format_string, str8_lit("abgr"), 0))
|
||||
{
|
||||
result.rgba_evals[0] = component_evals[3];
|
||||
result.rgba_evals[1] = component_evals[2];
|
||||
result.rgba_evals[2] = component_evals[1];
|
||||
result.rgba_evals[3] = component_evals[0];
|
||||
}
|
||||
for EachIndex(idx, 4)
|
||||
{
|
||||
result.rgba.v[idx] = e_value_eval_from_eval(result.rgba_evals[idx]).value.f32;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3573,72 +3578,43 @@ EV_EXPAND_RULE_INFO_FUNCTION_DEF(color)
|
||||
RD_VIEW_UI_FUNCTION_DEF(color)
|
||||
{
|
||||
Temp scratch = scratch_begin(0, 0);
|
||||
Vec2F32 dim = dim_2f32(rect);
|
||||
F32 padding = ui_top_font_size()*3.f;
|
||||
F32 sv_dim_px = Min(dim.x, dim.y);
|
||||
if(sv_dim_px == dim.x)
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: unpack state
|
||||
//
|
||||
typedef struct RD_ColorViewState RD_ColorViewState;
|
||||
struct RD_ColorViewState
|
||||
{
|
||||
padding = ui_top_font_size()*30.f;
|
||||
B32 initialized;
|
||||
U32 start_rgba_u32;
|
||||
Vec4F32 hsva;
|
||||
};
|
||||
RD_ColorViewState *state = rd_view_state(RD_ColorViewState);
|
||||
RD_EvalColor eval_color = rd_eval_color_from_eval(eval);
|
||||
U32 rgba_u32 = u32_from_rgba(eval_color.rgba);
|
||||
if(!state->initialized || rgba_u32 != state->start_rgba_u32)
|
||||
{
|
||||
Vec4F32 rgba = eval_color.rgba;
|
||||
Vec4F32 hsva = hsva_from_rgba(rgba);
|
||||
state->initialized = 1;
|
||||
state->start_rgba_u32 = rgba_u32;
|
||||
state->hsva = hsva;
|
||||
}
|
||||
Vec4F32 hsva = state->hsva;
|
||||
Vec4F32 rgba = rgba_from_hsva(hsva);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: calculate dimensions
|
||||
//
|
||||
Vec2F32 dim = dim_2f32(rect);
|
||||
F32 sv_dim_px = Min(dim.x, dim.y);
|
||||
F32 padding = sv_dim_px*0.2f;
|
||||
sv_dim_px -= padding*2.f;
|
||||
sv_dim_px = Min(sv_dim_px, ui_top_font_size()*70.f);
|
||||
RD_EvalColor eval_color = rd_eval_color_from_eval(eval);
|
||||
Vec4F32 rgba = eval_color.rgba;
|
||||
Vec4F32 hsva = hsva_from_rgba(rgba);
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: too small -> just show components
|
||||
//- rjf: build UI
|
||||
//
|
||||
if(dim.y <= ui_top_font_size()*12.f)
|
||||
{
|
||||
//- rjf: build text box
|
||||
UI_Box *text_box = &ui_nil_box;
|
||||
UI_WidthFill RD_Font(RD_FontSlot_Code)
|
||||
{
|
||||
text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero());
|
||||
DR_FStrList fstrs = {0};
|
||||
{
|
||||
DR_FStrParams params = {ui_top_font(), ui_top_text_raster_flags(), ui_color_from_name(str8_lit("text")), ui_top_font_size()};
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, str8_lit("("));
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, push_str8f(scratch.arena, "%.2f", rgba.x), .color = linear_from_srgba(v4f32(1.f, 0.25f, 0.25f, 1.f)), .underline_thickness = 4.f);
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, str8_lit(", "));
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, push_str8f(scratch.arena, "%.2f", rgba.y), .color = linear_from_srgba(v4f32(0.25f, 1.f, 0.25f, 1.f)), .underline_thickness = 4.f);
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, str8_lit(", "));
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, push_str8f(scratch.arena, "%.2f", rgba.z), .color = linear_from_srgba(v4f32(0.25f, 0.25f, 1.f, 1.f)), .underline_thickness = 4.f);
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, str8_lit(", "));
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, push_str8f(scratch.arena, "%.2f", rgba.w), .color = v4f32(1.f, 1.f, 1.f, 1.f), .underline_thickness = 4.f);
|
||||
dr_fstrs_push_new(scratch.arena, &fstrs, ¶ms, str8_lit(")"));
|
||||
}
|
||||
ui_box_equip_display_fstrs(text_box, &fstrs);
|
||||
}
|
||||
|
||||
//- rjf: build color box
|
||||
UI_Box *color_box = &ui_nil_box;
|
||||
UI_PrefWidth(ui_em(1.875f, 1.f)) UI_ChildLayoutAxis(Axis2_Y)
|
||||
{
|
||||
color_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "color_box");
|
||||
UI_Parent(color_box) UI_PrefHeight(ui_em(1.875f, 1.f)) UI_Padding(ui_pct(1, 0))
|
||||
{
|
||||
UI_BackgroundColor(rgba) UI_CornerRadius(ui_top_font_size()*0.5f)
|
||||
ui_build_box_from_key(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder, ui_key_zero());
|
||||
}
|
||||
}
|
||||
|
||||
//- rjf: space
|
||||
ui_spacer(ui_em(0.375f, 1.f));
|
||||
|
||||
//- rjf: hover color box -> show components
|
||||
UI_Signal sig = ui_signal_from_box(color_box);
|
||||
if(ui_hovering(sig))
|
||||
{
|
||||
ui_do_color_tooltip_hsva(hsva);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////
|
||||
//- rjf: large enough -> full color picker
|
||||
//
|
||||
else
|
||||
{
|
||||
UI_WidthFill UI_HeightFill
|
||||
UI_PrefHeight(ui_children_sum(1)) UI_Column UI_Padding(ui_pct(1.f, 0.f))
|
||||
@@ -3701,17 +3677,23 @@ RD_VIEW_UI_FUNCTION_DEF(color)
|
||||
{
|
||||
// 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)
|
||||
if(type->kind == E_TypeKind_U32 ||
|
||||
type->kind == E_TypeKind_S32 ||
|
||||
type->kind == E_TypeKind_U64 ||
|
||||
type->kind == E_TypeKind_S64)
|
||||
{
|
||||
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);
|
||||
if(rd_commit_eval_value_string(eval, string))
|
||||
{
|
||||
state->start_rgba_u32 = u32;
|
||||
state->hsva = hsva;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
scratch_end(scratch);
|
||||
}
|
||||
|
||||
|
||||
@@ -394,7 +394,7 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
|
||||
}
|
||||
|
||||
//- rjf: special case: colors
|
||||
if(str8_match(cfg->string, str8_lit("color"), 0))
|
||||
if(str8_match(cfg->string, str8_lit("theme_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("value"))->first->string;
|
||||
@@ -402,12 +402,14 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
|
||||
Vec4F32 color = linear_from_srgba(rgba_from_u32(color_u32));
|
||||
if(tags.size != 0)
|
||||
{
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, tags, .color = color);
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, tags);
|
||||
}
|
||||
else
|
||||
{
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, str8_lit("Color"), .color = rgba_secondary);
|
||||
}
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, str8_lit(" "));
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, rd_icon_kind_text_table[RD_IconKind_CircleFilled], .font = rd_font_from_slot(RD_FontSlot_Icons), .raster_flags = rd_raster_flags_from_slot(RD_FontSlot_Icons), .color = color);
|
||||
}
|
||||
|
||||
#undef start_secondary
|
||||
|
||||
+39
-19
@@ -565,20 +565,40 @@ internal UI_BOX_CUSTOM_DRAW(ui_sat_val_picker_draw)
|
||||
|
||||
// rjf: hue => rgb
|
||||
Vec3F32 hue_rgb = rgb_from_hsv(v3f32(data->hue, 1, 1));
|
||||
Vec3F32 hue_rgb_linear = linear_from_srgb(hue_rgb);
|
||||
|
||||
// rjf: white -> rgb background
|
||||
// rjf: rgb background
|
||||
{
|
||||
R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(hue_rgb.x, hue_rgb.y, hue_rgb.z, 1), 4.f, 0, 1.f);
|
||||
dr_rect(pad_2f32(box->rect, -1.f), v4f32(hue_rgb_linear.x, hue_rgb_linear.y, hue_rgb_linear.z, 1), 4.f, 0, 1.f);
|
||||
}
|
||||
|
||||
// rjf: white gradient overlay
|
||||
{
|
||||
R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(hue_rgb_linear.x, hue_rgb_linear.y, hue_rgb_linear.z, 0), 4.f, 0, 1.f);
|
||||
inst->colors[Corner_00] = inst->colors[Corner_01] = v4f32(1, 1, 1, 1);
|
||||
}
|
||||
|
||||
// rjf: black gradient overlay
|
||||
// rjf: black gradient overlay pt. 1
|
||||
{
|
||||
R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(0, 0, 0, 0), 4.f, 0, 1.f);
|
||||
inst->colors[Corner_01] = v4f32(0, 0, 0, 1.f);
|
||||
inst->colors[Corner_11] = v4f32(0, 0, 0, 1.f);
|
||||
}
|
||||
|
||||
// rjf: black gradient overlay pt. 2
|
||||
{
|
||||
R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(0, 0, 0, 0), 4.f, 0, 1.f);
|
||||
inst->colors[Corner_01] = v4f32(0, 0, 0, 1);
|
||||
inst->colors[Corner_11] = v4f32(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
// rjf: black gradient overlay pt. 3
|
||||
{
|
||||
R_Rect2DInst *inst = dr_rect(pad_2f32(box->rect, -1.f), v4f32(0, 0, 0, 0), 4.f, 0, 1.f);
|
||||
inst->colors[Corner_01] = v4f32(0, 0, 0, 0.2f);
|
||||
inst->colors[Corner_11] = v4f32(0, 0, 0, 0.2f);
|
||||
}
|
||||
|
||||
// rjf: indicator
|
||||
{
|
||||
Vec2F32 box_rect_dim = dim_2f32(box->rect);
|
||||
@@ -588,7 +608,7 @@ internal UI_BOX_CUSTOM_DRAW(ui_sat_val_picker_draw)
|
||||
center.y - half_size,
|
||||
center.x + half_size,
|
||||
center.y + half_size);
|
||||
dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f);
|
||||
dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2.f, 2.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -677,13 +697,13 @@ internal UI_BOX_CUSTOM_DRAW(ui_hue_picker_draw)
|
||||
F32 hue1 = (F32)(seg+1)/6;
|
||||
Vec3F32 rgb0 = rgb_from_hsv(v3f32(hue0, 1, 1));
|
||||
Vec3F32 rgb1 = rgb_from_hsv(v3f32(hue1, 1, 1));
|
||||
Vec4F32 rgba0 = v4f32(rgb0.x, rgb0.y, rgb0.z, 1);
|
||||
Vec4F32 rgba1 = v4f32(rgb1.x, rgb1.y, rgb1.z, 1);
|
||||
Vec4F32 rgba0_linear = linear_from_srgba(v4f32(rgb0.x, rgb0.y, rgb0.z, 1));
|
||||
Vec4F32 rgba1_linear = linear_from_srgba(v4f32(rgb1.x, rgb1.y, rgb1.z, 1));
|
||||
R_Rect2DInst *inst = dr_rect(rect, v4f32(0, 0, 0, 0), 0, 0, 0.f);
|
||||
inst->colors[Corner_00] = rgba0;
|
||||
inst->colors[Corner_01] = rgba1;
|
||||
inst->colors[Corner_10] = rgba0;
|
||||
inst->colors[Corner_11] = rgba1;
|
||||
inst->colors[Corner_00] = rgba0_linear;
|
||||
inst->colors[Corner_01] = rgba1_linear;
|
||||
inst->colors[Corner_10] = rgba0_linear;
|
||||
inst->colors[Corner_11] = rgba1_linear;
|
||||
rect.y0 += segment_dim;
|
||||
rect.y1 += segment_dim;
|
||||
}
|
||||
@@ -691,13 +711,13 @@ internal UI_BOX_CUSTOM_DRAW(ui_hue_picker_draw)
|
||||
// rjf: indicator
|
||||
{
|
||||
Vec2F32 box_rect_dim = dim_2f32(box->rect);
|
||||
Vec2F32 center = v2f32((box->rect.x0+box->rect.x1)/2, box->rect.y0 + data->hue*box_rect_dim.y);
|
||||
F32 half_size = box->font_size * (0.5f + box->active_t*0.2f);
|
||||
Vec2F32 center = v2f32((box->rect.x0+box->rect.x1)/2, box->rect.y0 + (data->hue)*box_rect_dim.y);
|
||||
F32 half_size = box_rect_dim.x * (0.52f + 0.02f * box->active_t);
|
||||
Rng2F32 rect = r2f32p(center.x - half_size,
|
||||
center.y - 2.f,
|
||||
center.y - box->font_size * (0.5f + 0.1f * box->active_t),
|
||||
center.x + half_size,
|
||||
center.y + 2.f);
|
||||
dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f);
|
||||
center.y + box->font_size * (0.5f + 0.1f * box->active_t));
|
||||
dr_rect(rect, v4f32(1, 1, 1, 1), 1.f, 2.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -779,12 +799,12 @@ internal UI_BOX_CUSTOM_DRAW(ui_alpha_picker_draw)
|
||||
{
|
||||
Vec2F32 box_rect_dim = dim_2f32(box->rect);
|
||||
Vec2F32 center = v2f32((box->rect.x0+box->rect.x1)/2, box->rect.y0 + (1-data->alpha)*box_rect_dim.y);
|
||||
F32 half_size = box->font_size * (0.5f + box->active_t*0.2f);
|
||||
F32 half_size = box_rect_dim.x * (0.52f + 0.02f * box->active_t);
|
||||
Rng2F32 rect = r2f32p(center.x - half_size,
|
||||
center.y - 2.f,
|
||||
center.y - box->font_size * (0.5f + 0.1f * box->active_t),
|
||||
center.x + half_size,
|
||||
center.y + 2.f);
|
||||
dr_rect(rect, v4f32(1, 1, 1, 1), half_size/2, 2.f, 1.f);
|
||||
center.y + box->font_size * (0.5f + 0.1f * box->active_t));
|
||||
dr_rect(rect, v4f32(1, 1, 1, 1), 1.f, 2.f, 1.f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user