From d4898f23167e17caf912de30b3cba8f1f4aaee19 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sun, 26 May 2024 09:58:51 -0400 Subject: [PATCH] feat: allow configuring menu toggle button (#181) * feat: allow configuring menu toggle button * fix: hide toggle menu binding config for keyboard * fix: assign defaults for inputs that don't exist in `controls.json` --- assets/config_menu/controls.rml | 1 + include/recomp_input.h | 33 ++++++++++++++++++++++++++++++++- src/game/config.cpp | 11 +++++++++++ src/game/input.cpp | 12 +++++++++++- src/ui/ui_renderer.cpp | 19 +++++++++++++++---- 5 files changed, 70 insertions(+), 6 deletions(-) diff --git a/assets/config_menu/controls.rml b/assets/config_menu/controls.rml index 4621093..ed6a466 100644 --- a/assets/config_menu/controls.rml +++ b/assets/config_menu/controls.rml @@ -41,6 +41,7 @@ data-for="input_bindings, i : inputs.array" data-event-mouseover="set_input_row_focus(i)" data-class-control-option--active="get_input_enum_name(i)==cur_input_row" + data-if="!input_device_is_keyboard || get_input_enum_name(i) != 'TOGGLE_MENU'" >