feat(engine): unify destructive-confirm verbs — drop "Yes," prefix

Both confirm modals previously used a "Yes, <verb>" pattern that read
like a question-and-answer dialog ("Are you sure? Yes, forfeit"); the
canonical UX pattern for a destructive confirm is just the bare verb.

The Confirm New Game modal's primary button is now "New game" instead
of "Yes, abandon" — matching the verb the user originally clicked
and framing the action positively rather than as a loss.

The Forfeit Confirm modal's primary button is now "Forfeit" instead
of "Yes, forfeit" — same pattern, less ceremony.

The Pause menu's own Resume / Forfeit buttons are unchanged: it's an
action menu, not a destructive confirm, and bare verbs are already
correct there.

Two doc comments and the ui_modal.rs spawn_modal_button example
docstring are updated to reflect the new copy. Marker symbol names
(ConfirmYesButton, ForfeitConfirmButton) are kept to avoid
unnecessary churn — the rename would ripple into mouse-input handlers
without a matching user-visible benefit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
funman300
2026-04-30 22:45:19 +00:00
parent 2e080d02ce
commit 0c86cac2d5
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -214,7 +214,7 @@ fn handle_new_game(
} }
} }
/// Marker on the primary "Yes, abandon" button inside the confirm modal. /// Marker on the primary "New game" button inside the confirm modal.
#[derive(Component, Debug)] #[derive(Component, Debug)]
pub struct ConfirmYesButton; pub struct ConfirmYesButton;
@@ -265,7 +265,7 @@ fn spawn_confirm_dialog(
spawn_modal_button( spawn_modal_button(
actions, actions,
ConfirmYesButton, ConfirmYesButton,
"Yes, abandon", "New game",
Some("Y"), Some("Y"),
ButtonVariant::Primary, ButtonVariant::Primary,
font_res, font_res,
+3 -3
View File
@@ -72,7 +72,7 @@ pub struct ForfeitConfirmScreen;
#[derive(Component, Debug)] #[derive(Component, Debug)]
struct ForfeitCancelButton; struct ForfeitCancelButton;
/// Marker on the "Yes, forfeit" primary button inside the forfeit-confirm modal. /// Marker on the "Forfeit" primary button inside the forfeit-confirm modal.
#[derive(Component, Debug)] #[derive(Component, Debug)]
struct ForfeitConfirmButton; struct ForfeitConfirmButton;
@@ -468,7 +468,7 @@ fn spawn_draw_mode_row(
)); ));
} }
/// Spawns `ForfeitConfirmScreen` — a Cancel / "Yes, forfeit" modal /// Spawns `ForfeitConfirmScreen` — a Cancel / "Forfeit" modal
/// stacked above the pause modal at `Z_PAUSE_DIALOG`. /// stacked above the pause modal at `Z_PAUSE_DIALOG`.
fn spawn_forfeit_confirm_screen(commands: &mut Commands, font_res: Option<&FontResource>) { fn spawn_forfeit_confirm_screen(commands: &mut Commands, font_res: Option<&FontResource>) {
spawn_modal( spawn_modal(
@@ -495,7 +495,7 @@ fn spawn_forfeit_confirm_screen(commands: &mut Commands, font_res: Option<&FontR
spawn_modal_button( spawn_modal_button(
actions, actions,
ForfeitConfirmButton, ForfeitConfirmButton,
"Yes, forfeit", "Forfeit",
Some("Y"), Some("Y"),
ButtonVariant::Primary, ButtonVariant::Primary,
font_res, font_res,
+1 -1
View File
@@ -38,7 +38,7 @@
//! spawn_modal_button( //! spawn_modal_button(
//! actions, //! actions,
//! ConfirmButton, //! ConfirmButton,
//! "Yes, abandon", //! "New game",
//! Some("Y"), //! Some("Y"),
//! ButtonVariant::Primary, //! ButtonVariant::Primary,
//! font_res, //! font_res,