FlappyBug: Allow shortcuts for quitting and help

As the menus show that ALT-F4 quit and F1 brings up help, we should
make the application do that instead of just undocumented ESC
This commit is contained in:
Hugh Davenport 2024-01-04 16:58:29 +13:00 committed by Jelle Raaijmakers
parent 9d62dfabbb
commit 8740a8c056

View file

@ -82,14 +82,14 @@ void Game::paint_event(GUI::PaintEvent& event)
void Game::keydown_event(GUI::KeyEvent& event) void Game::keydown_event(GUI::KeyEvent& event)
{ {
// FIXME: After #22573 is merged, then remove the case for F11 below and ensure it is in this check here which also checks for modifiers if (event.modifiers() || event.key() == Key_F1 || event.key() == Key_F11) {
event.ignore();
return;
}
switch (event.key()) { switch (event.key()) {
case Key_Escape: case Key_Escape:
GUI::Application::the()->quit(); GUI::Application::the()->quit();
break; break;
case Key_F11:
event.ignore();
break;
default: default:
player_input(); player_input();
break; break;