Skip to content

Commit

Permalink
don't disable Space for menu input if pause is not Space
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Nov 11, 2023
1 parent f44e576 commit 1c61afb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/injected/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6043,6 +6043,8 @@ void render_options()
ImGui::TextWrapped("- The %s and %s keys will only toggle the pause types listed above, i.e. setting auto-pause but not including fade in the pause flags won't let you unpause from that state", key_string(keys["toggle_pause"]).c_str(), key_string(keys["frame_advance"]).c_str());
ImGui::TextWrapped("- The freeze options will block the game in the specified callback as well as enforce any selected normal pause flags");
ImGui::TextWrapped("- Using the freeze options without a) a camera hack or b) a normal pause flag (use fade) will induce weird camera flickering");
if (keys["toggle_pause"] & VK_SPACE || keys["frame_advance"] & VK_SPACE || keys["frame_advance_alt"] & VK_SPACE)
ImGui::TextColored(ImVec4(1.0f, 0.3f, 0.3f, 1.0f), "Warning: frame_advance/toggle_pause is bound to Space,\nnormal menu input using Space will be disabled (use Z)");
endmenu();
}

Expand Down Expand Up @@ -9306,7 +9308,7 @@ set_callback(function()
end, ON.PRE_PROCESS_INPUT)

set_callback(function()
if kb[40].down and not kb[33].down then
if (test_mask(ol.keys["toggle_pause"], KEY.SPACE) or test_mask(ol.keys["frame_advance"], KEY.SPACE) or test_mask(ol.keys["frame_advance_alt"], KEY.SPACE)) and kb[40].down and not kb[33].down then
gp.input_menu = clr_mask(gp.input_menu, MENU_INPUT.SELECT)
end
end, ON.POST_PROCESS_INPUT)
Expand Down

0 comments on commit 1c61afb

Please sign in to comment.