Solitaire: Ignore all key presses while dragging cards
This prevents you from tab-moving cards while dragging some.
This commit is contained in:
parent
ff175389ab
commit
8589f1115e
Notes:
sideshowbarker
2024-07-17 14:33:07 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/8589f1115e Pull-request: https://github.com/SerenityOS/serenity/pull/15388
1 changed files with 2 additions and 2 deletions
|
@ -207,14 +207,14 @@ void Game::update_score(int to_add)
|
|||
|
||||
void Game::keydown_event(GUI::KeyEvent& event)
|
||||
{
|
||||
if (m_new_game_animation || m_game_over_animation)
|
||||
if (is_moving_cards() || m_new_game_animation || m_game_over_animation)
|
||||
return;
|
||||
|
||||
if (event.shift() && event.key() == KeyCode::Key_F12) {
|
||||
start_game_over_animation();
|
||||
} else if (event.key() == KeyCode::Key_Tab) {
|
||||
auto_move_eligible_cards_to_foundations();
|
||||
} else if (event.key() == KeyCode::Key_Space && m_mouse_down != true) {
|
||||
} else if (event.key() == KeyCode::Key_Space) {
|
||||
draw_cards();
|
||||
} else if (event.shift() && event.key() == KeyCode::Key_F11) {
|
||||
if constexpr (SOLITAIRE_DEBUG) {
|
||||
|
|
Loading…
Add table
Reference in a new issue