From 19d2e38499cb802449353cd51e234eac1457f2e1 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Sat, 6 Jul 2024 03:19:31 +0200 Subject: [PATCH] Allow configuring menu accept/apply buttons (#385) * feat: allow configuring menu accept/apply buttons * Update assets/icons/Reset.svg Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> --------- Co-authored-by: thecozies <79979276+thecozies@users.noreply.github.com> --- assets/config_menu/controls.rml | 13 ++++++- assets/config_menu/graphics.rml | 2 +- assets/icons/Reset.svg | 5 +++ include/recomp_input.h | 9 ++++- include/zelda_config.h | 2 + src/game/config.cpp | 16 ++++++++ src/game/input.cpp | 67 ++++++++++++++++++++++++--------- src/ui/ui_config.cpp | 43 +++++++++++++++++++-- src/ui/ui_renderer.cpp | 41 +++++++++++++------- 9 files changed, 160 insertions(+), 38 deletions(-) create mode 100644 assets/icons/Reset.svg diff --git a/assets/config_menu/controls.rml b/assets/config_menu/controls.rml index ed6a466..3a8371e 100644 --- a/assets/config_menu/controls.rml +++ b/assets/config_menu/controls.rml @@ -41,7 +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'" + data-if="!input_device_is_keyboard || (get_input_enum_name(i) != 'TOGGLE_MENU' && get_input_enum_name(i) != 'ACCEPT_MENU' && get_input_enum_name(i) != 'APPLY_MENU')" >