mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
Solitaire: Ignore unhandled keydown events
This makes Action shortcuts work again. :^)
This commit is contained in:
parent
9665f41979
commit
0bf37b8763
1 changed files with 5 additions and 1 deletions
|
@ -207,8 +207,10 @@ void Game::update_score(int to_add)
|
|||
|
||||
void Game::keydown_event(GUI::KeyEvent& event)
|
||||
{
|
||||
if (is_moving_cards() || m_new_game_animation || m_game_over_animation)
|
||||
if (is_moving_cards() || m_new_game_animation || m_game_over_animation) {
|
||||
event.ignore();
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.shift() && event.key() == KeyCode::Key_F12) {
|
||||
start_game_over_animation();
|
||||
|
@ -220,6 +222,8 @@ void Game::keydown_event(GUI::KeyEvent& event)
|
|||
if constexpr (SOLITAIRE_DEBUG) {
|
||||
dump_layout();
|
||||
}
|
||||
} else {
|
||||
event.ignore();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue