From baca24c0377d9498fe6830ac1e16d9da8b7607e0 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Mon, 29 Jan 2024 12:53:09 -0800 Subject: [PATCH] fix leftover event consumption tautological rule; fix a few small visual issues --- src/df/core/df_core.mdesk | 2 +- src/df/core/generated/df_core.meta.c | 2 +- src/df/gfx/df_gfx.c | 14 +++++++------- src/raddbg/raddbg.c | 8 ++------ 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/df/core/df_core.mdesk b/src/df/core/df_core.mdesk index 90f0b07c..2c7c8981 100644 --- a/src/df/core/df_core.mdesk +++ b/src/df/core/df_core.mdesk @@ -345,7 +345,7 @@ DF_CoreCmdTable:// | | | {RetryEndedProcess 1 Entity Process 0 0 0 0 0 0 Null "retry_ended_process" "Retry Ended Process" "Launches a new process with the same options as the passed ended process." "" } //- rjf: attaching - {Attach 0 ID Nil 0 0 0 0 1 1 Null "attach" "Attach" "Attaches to a process that is already running on the local machine." "" } + {Attach 0 ID Nil 0 0 0 0 0 1 Null "attach" "Attach" "Attaches to a process that is already running on the local machine." "" } {RegisterAsJITDebugger 0 Null Nil 0 0 0 0 0 0 Null "register_as_jit_debugger" "Register As Just-In-Time (JIT) Debugger" "Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system." "" } //- rjf: catchall general entity activation paths (drag/drop, clicking) diff --git a/src/df/core/generated/df_core.meta.c b/src/df/core/generated/df_core.meta.c index b7627334..798be5bd 100644 --- a/src/df/core/generated/df_core.meta.c +++ b/src/df/core/generated/df_core.meta.c @@ -174,7 +174,7 @@ DF_CmdSpecInfo df_g_core_cmd_kind_spec_info_table[] = { str8_lit_comp("enable_target"), str8_lit_comp("Enables a target, in addition to all targets currently enabled."), str8_lit_comp(""), str8_lit_comp("Enable Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckFilled}, { str8_lit_comp("disable_target"), str8_lit_comp("Disables a target."), str8_lit_comp(""), str8_lit_comp("Disable Target"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Entity, DF_EntityKind_Target, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_CheckHollow}, { str8_lit_comp("retry_ended_process"), str8_lit_comp("Launches a new process with the same options as the passed ended process."), str8_lit_comp(""), str8_lit_comp("Retry Ended Process"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Entity, DF_EntityKind_Process, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, -{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_ID, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*1)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, +{ str8_lit_comp("attach"), str8_lit_comp("Attaches to a process that is already running on the local machine."), str8_lit_comp(""), str8_lit_comp("Attach"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_ID, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*1)}, DF_IconKind_Null}, { str8_lit_comp("register_as_jit_debugger"), str8_lit_comp("Registers the RAD debugger as the just-in-time (JIT) debugger used by the operating system."), str8_lit_comp(""), str8_lit_comp("Register As Just-In-Time (JIT) Debugger"), (DF_CmdSpecFlag_OmitFromLists*0), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, { str8_lit_comp("entity_ref_fast_path"), str8_lit_comp("Activates the default behavior when clicking an entity reference."), str8_lit_comp(""), str8_lit_comp("Entity Reference Fast Path"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, { str8_lit_comp("spawn_entity_view"), str8_lit_comp("Spawns a new view, given an entity and other parameterizations."), str8_lit_comp(""), str8_lit_comp("Spawn Entity View"), (DF_CmdSpecFlag_OmitFromLists*1), {DF_CmdParamSlot_Null, DF_EntityKind_Nil, (DF_CmdQueryFlag_AllowFiles*0)|(DF_CmdQueryFlag_AllowFolders*0)|(DF_CmdQueryFlag_CodeInput*0)|(DF_CmdQueryFlag_KeepOldInput*0)|(DF_CmdQueryFlag_SelectOldInput*0)|(DF_CmdQueryFlag_Required*0)}, DF_IconKind_Null}, diff --git a/src/df/gfx/df_gfx.c b/src/df/gfx/df_gfx.c index 15cdf5d4..4272b541 100644 --- a/src/df/gfx/df_gfx.c +++ b/src/df/gfx/df_gfx.c @@ -8409,14 +8409,14 @@ df_box_equip_fuzzy_match_range_list_vis(UI_Box *box, DF_FuzzyMatchRangeList rang f_dim_from_tag_size_string(box->font, box->font_size, str8_prefix(display_string, match_n->range.min)).x, f_dim_from_tag_size_string(box->font, box->font_size, str8_prefix(display_string, match_n->range.max)).x, }; - ui_set_next_fixed_x(match_pixel_range.min + box->text_padding + 2.f); - ui_set_next_fixed_y(box->font_size/2.f); + ui_set_next_fixed_x(match_pixel_range.min + box->text_padding + 4.f); + ui_set_next_fixed_y(box->font_size/8.f); ui_set_next_fixed_width(match_pixel_range.max-match_pixel_range.min); - ui_set_next_fixed_height(line_height*1.2f); - ui_set_next_corner_radius_00(box->font_size/2.f); - ui_set_next_corner_radius_01(box->font_size/2.f); - ui_set_next_corner_radius_10(box->font_size/2.f); - ui_set_next_corner_radius_11(box->font_size/2.f); + ui_set_next_pref_height(ui_pct(1, 0)); + ui_set_next_corner_radius_00(box->font_size/3.f); + ui_set_next_corner_radius_01(box->font_size/3.f); + ui_set_next_corner_radius_10(box->font_size/3.f); + ui_set_next_corner_radius_11(box->font_size/3.f); ui_set_next_background_color(df_rgba_from_theme_color(DF_ThemeColor_PlainOverlay)); ui_build_box_from_key(UI_BoxFlag_FloatingX|UI_BoxFlag_FloatingY|UI_BoxFlag_DrawBackground, ui_key_zero()); } diff --git a/src/raddbg/raddbg.c b/src/raddbg/raddbg.c index 9d4c6203..e4689fcf 100644 --- a/src/raddbg/raddbg.c +++ b/src/raddbg/raddbg.c @@ -331,12 +331,8 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data) next = ev->next; if(ev->timestamp_us+1000000 < os_now_microseconds() || ev->kind == OS_EventKind_Text || - (ev->kind == OS_EventKind_Press && ev->key != OS_Key_LeftMouseButton) || - (ev->kind == OS_EventKind_Press && ev->key != OS_Key_RightMouseButton) || - (ev->kind == OS_EventKind_Press && ev->key != OS_Key_MiddleMouseButton) || - (ev->kind == OS_EventKind_Release && ev->key != OS_Key_LeftMouseButton) || - (ev->kind == OS_EventKind_Release && ev->key != OS_Key_RightMouseButton) || - (ev->kind == OS_EventKind_Release && ev->key != OS_Key_MiddleMouseButton) || + (ev->kind == OS_EventKind_Press && ev->key != OS_Key_LeftMouseButton && ev->key != OS_Key_RightMouseButton && ev->key != OS_Key_MiddleMouseButton) || + (ev->kind == OS_EventKind_Release && ev->key != OS_Key_LeftMouseButton && ev->key != OS_Key_RightMouseButton && ev->key != OS_Key_MiddleMouseButton) || (ev->kind == OS_EventKind_Scroll)) { os_eat_event(&leftover_events, ev);