mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
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:
parent
9d62dfabbb
commit
8740a8c056
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue