From 492abc09bcf1fb433e99f7df3fbe24699acbf48d Mon Sep 17 00:00:00 2001 From: Gregor Klevze Date: Wed, 17 Dec 2025 20:35:39 +0100 Subject: [PATCH] fixed menu in help options --- src/states/MenuState.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/states/MenuState.cpp b/src/states/MenuState.cpp index 484d584..bfbbe40 100644 --- a/src/states/MenuState.cpp +++ b/src/states/MenuState.cpp @@ -330,14 +330,20 @@ void MenuState::handleEvent(const SDL_Event& e) { // Close help panel helpPanelAnimating = true; helpDirection = -1; return; + case SDL_SCANCODE_LEFT: + case SDL_SCANCODE_RIGHT: + case SDL_SCANCODE_UP: + case SDL_SCANCODE_DOWN: + // Arrow keys: close help and immediately return to main menu navigation. + helpPanelAnimating = true; helpDirection = -1; + break; case SDL_SCANCODE_PAGEDOWN: - case SDL_SCANCODE_DOWN: { - helpScroll += 40.0; return; - } + helpScroll += 40.0; + return; case SDL_SCANCODE_PAGEUP: - case SDL_SCANCODE_UP: { - helpScroll -= 40.0; if (helpScroll < 0.0) helpScroll = 0.0; return; - } + helpScroll -= 40.0; + if (helpScroll < 0.0) helpScroll = 0.0; + return; default: return; }