Skip to content

Commit

Permalink
fix leftover event consumption tautological rule; fix a few small vis…
Browse files Browse the repository at this point in the history
…ual issues
  • Loading branch information
ryanfleury committed Jan 29, 2024
1 parent 57fb21a commit baca24c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/df/core/df_core.mdesk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/df/core/generated/df_core.meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
14 changes: 7 additions & 7 deletions src/df/gfx/df_gfx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
8 changes: 2 additions & 6 deletions src/raddbg/raddbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit baca24c

Please sign in to comment.