Solitaire: Ignore all key presses while dragging cards

This prevents you from tab-moving cards while dragging some.
This commit is contained in:
Sam Atkins 2022-09-29 11:33:12 +01:00 committed by Sam Atkins
parent ff175389ab
commit 8589f1115e
Notes: sideshowbarker 2024-07-17 14:33:07 +09:00

View File

@ -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) {