feat(engine): N keypress now opens the real Confirm/Cancel modal
Previously a first N press during an active game showed a "Press N again" toast and started a 3-second countdown — a UI-first violation since the only continuation was another keystroke. The HUD New Game button already routed through `ConfirmNewGameScreen` with real Cancel / New game buttons; this change makes keyboard N do the same. - handle_keyboard_core fires NewGameRequestEvent::default() directly; handle_new_game's existing active-game check spawns the modal. - Shift+N keeps the keyboard power-user bypass (confirmed: true). - N is suppressed while the confirm modal or restore prompt is open so those modals' own input handlers can process N (cancel / start-new-game) without us re-firing the same frame they close. - KeyboardConfirmState, NEW_GAME_CONFIRM_WINDOW, NewGameConfirmEvent, and the "Press N again" toast handler are removed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
//!
|
||||
//! # Task #69 — Animated card deal on new game start
|
||||
//!
|
||||
//! When `NewGameRequestEvent` fires (on a fresh game, `move_count == 0`) or
|
||||
//! `NewGameConfirmEvent` fires, `start_deal_anim` reads `LayoutResource` and
|
||||
//! When `NewGameRequestEvent` fires (on a fresh game, `move_count == 0`),
|
||||
//! `start_deal_anim` reads `LayoutResource` and
|
||||
//! inserts a `CardAnim` on every card entity, sliding each card from the stock
|
||||
//! pile's position to its current (final) position with a per-card stagger
|
||||
//! derived from the current `AnimSpeed` setting plus a deterministic ±10 %
|
||||
|
||||
Reference in New Issue
Block a user