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:
@@ -207,13 +207,6 @@ pub struct ToggleLeaderboardRequestEvent;
|
||||
#[derive(Message, Debug, Clone)]
|
||||
pub struct SyncCompleteEvent(pub Result<SyncResponse, String>);
|
||||
|
||||
/// Fired by `InputPlugin` when N is pressed while a game is in progress
|
||||
/// but confirmation has not yet been received. The animation plugin shows
|
||||
/// a "Press N again to confirm" toast. A second N press within the
|
||||
/// confirmation window sends `NewGameRequestEvent`.
|
||||
#[derive(Message, Debug, Clone, Copy, Default)]
|
||||
pub struct NewGameConfirmEvent;
|
||||
|
||||
/// Generic informational toast message. Any system can fire this to display
|
||||
/// a short string to the player, e.g. "Locked — reach level 5".
|
||||
#[derive(Message, Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user