fixed menu in help options

This commit is contained in:
2025-12-17 20:35:39 +01:00
parent fe6c5e3c8a
commit 492abc09bc

View File

@ -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;
}