fixed menu in help options
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user