From e76edca5dbcb4ddb0184d7f44de6614b4adbfe36 Mon Sep 17 00:00:00 2001 From: mchughalex <25671999+mchughalex@users.noreply.github.com> Date: Thu, 16 Jul 2026 22:34:37 +0100 Subject: [PATCH] app: settings menu integration --- README.md | 2 +- src/skate3_app_common.cpp | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5f30372..121fffa 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ The builds include an experimental true ultrawide aspect ratio mode at 21:9. You - Standard Xbox controls using an Xbox controller are the preferred and main input method. DualShock and others are untested, but are likely to work with Steam Input through XInput. - Keyboard controls can be enabled in the game settings menu. -- Press Escape on keyboard or (Back + Start) on the controller to open the game settings menu. +- Press Escape on keyboard or (LB + RB + Start) on the controller to open the game settings menu. ### Keyboard Keybinds diff --git a/src/skate3_app_common.cpp b/src/skate3_app_common.cpp index 1ff66a0..c6a5f6d 100644 --- a/src/skate3_app_common.cpp +++ b/src/skate3_app_common.cpp @@ -707,7 +707,13 @@ void Skate3BaseApp::OnCreateDialogs(rex::ui::ImGuiDrawer* drawer) { // so it never affects cursor or focus handling. render_mode_indicator_ = std::make_unique(drawer); rex::ui::RegisterBind("bind_skate3_menu", "Escape", "Skate 3 settings", [this] { - ToggleSimpleSettings(); + // Escape backs out of the settings screen level by level (rows -> + // category rail -> closed); when the screen is closed it opens it. + if (simple_settings_dialog_ && simple_settings_dialog_->visible()) { + simple_settings_dialog_->NavigateBack(); + } else { + ToggleSimpleSettings(); + } }); rex::ui::RegisterBind("bind_skate3_menu_alt", "F1", "Skate 3 settings alternate", [this] { ToggleSimpleSettings(); @@ -876,10 +882,27 @@ void Skate3BaseApp::ToggleSimpleSettings() { }); }; auto restart_game = [this]() { RestartGame(); }; + // Raw pad poll for menu navigation: bypasses the is_active gate that + // zeroes guest-facing input while the settings screen is open. + auto poll_gamepad = [this]() { + rex::ui::SimpleSettingsGamepad pad; + auto* input_system = static_cast(runtime()->input_system()); + if (input_system) { + rex::input::X_INPUT_GAMEPAD state; + if (input_system->GetUiGamepadState(&state)) { + pad.connected = true; + pad.buttons = state.buttons; + pad.thumb_lx = state.thumb_lx; + pad.thumb_ly = state.thumb_ly; + } + } + return pad; + }; simple_settings_dialog_ = std::make_unique( imgui_drawer(), user_settings_path_, std::move(load_profiles), std::move(save_profile), - std::move(close_settings), std::move(close_game), std::move(restart_game)); + std::move(close_settings), std::move(close_game), std::move(restart_game), + std::move(poll_gamepad)); ApplySettingsCursorMode(); simple_settings_dialog_->Show(); }