mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-18 15:32:22 +00:00
Solitaire: Ignore unhandled keydown events
This makes Action shortcuts work again. :^)
This commit is contained in:
parent
9665f41979
commit
0bf37b8763
Notes:
sideshowbarker
2024-07-17 06:35:23 +09:00
Author: https://github.com/AtkinsSJ
Commit: 0bf37b8763
Pull-request: https://github.com/SerenityOS/serenity/pull/16494
Reviewed-by: https://github.com/linusg ✅
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)
|
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;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (event.shift() && event.key() == KeyCode::Key_F12) {
|
if (event.shift() && event.key() == KeyCode::Key_F12) {
|
||||||
start_game_over_animation();
|
start_game_over_animation();
|
||||||
|
@ -220,6 +222,8 @@ void Game::keydown_event(GUI::KeyEvent& event)
|
||||||
if constexpr (SOLITAIRE_DEBUG) {
|
if constexpr (SOLITAIRE_DEBUG) {
|
||||||
dump_layout();
|
dump_layout();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
event.ignore();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue