refactor(engine): final hint-highlight + replay-overlay token cleanup

- input_plugin's hint-source card tint moves from raw bright-yellow
  `srgba(1.0, 1.0, 0.4, 1.0)` to the design-system STATE_WARNING
  token, so the source card and the destination pile (which already
  uses STATE_WARNING via HINT_PILE_HIGHLIGHT_COLOUR) wear the same
  attention colour as a coherent pair.
- replay_overlay had two stale doc comments referencing the old
  "loud yellow accent" — Primary is now cyan (ACCENT_PRIMARY).
  Comments updated; no behaviour change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-07 18:45:02 -07:00
parent cdcaddaabe
commit 9891ae4ba3
2 changed files with 10 additions and 6 deletions
+6 -3
View File
@@ -35,7 +35,7 @@ use crate::card_plugin::{
CardEntity, HintHighlight, HintHighlightTimer, STACK_FAN_FRAC, TABLEAU_FACEDOWN_FAN_FRAC, CardEntity, HintHighlight, HintHighlightTimer, STACK_FAN_FRAC, TABLEAU_FACEDOWN_FAN_FRAC,
TABLEAU_FAN_FRAC, TABLEAU_FAN_FRAC,
}; };
use crate::ui_theme::MOTION_DRAG_REJECT_SECS; use crate::ui_theme::{MOTION_DRAG_REJECT_SECS, STATE_WARNING};
use solitaire_core::game_state::DrawMode; use solitaire_core::game_state::DrawMode;
use crate::challenge_plugin::CHALLENGE_UNLOCK_LEVEL; use crate::challenge_plugin::CHALLENGE_UNLOCK_LEVEL;
use crate::events::{ use crate::events::{
@@ -335,8 +335,11 @@ pub fn emit_hint_visuals(
for (entity, card_entity, mut sprite) in card_entities.iter_mut() { for (entity, card_entity, mut sprite) in card_entities.iter_mut() {
if card_entity.card_id == card_id { if card_entity.card_id == card_id {
// Tint the card gold without replacing the Sprite (which would // Tint the card gold without replacing the Sprite (which would
// discard the image handle set by CardImageSet). // discard the image handle set by CardImageSet). Uses the
sprite.color = Color::srgba(1.0, 1.0, 0.4, 1.0); // design-system `STATE_WARNING` token so the source-card
// tint matches the destination pile highlight, both of
// which signal "look here" for the hint.
sprite.color = STATE_WARNING;
commands.entity(entity) commands.entity(entity)
.insert(HintHighlight { remaining: 2.0 }) .insert(HintHighlight { remaining: 2.0 })
.insert(HintHighlightTimer(2.0)); .insert(HintHighlightTimer(2.0));
+4 -3
View File
@@ -208,8 +208,9 @@ fn spawn_overlay(
GlobalZIndex(Z_REPLAY_OVERLAY), GlobalZIndex(Z_REPLAY_OVERLAY),
)) ))
.with_children(|banner| { .with_children(|banner| {
// Left: "Replay" label in the loud yellow accent so it reads // Left: "Replay" label in the cyan primary accent
// unmistakably as a non-gameplay surface. // (`ACCENT_PRIMARY`) so it reads unmistakably as a
// non-gameplay surface.
banner.spawn(( banner.spawn((
ReplayOverlayBannerText, ReplayOverlayBannerText,
Text::new(banner_label), Text::new(banner_label),
@@ -236,7 +237,7 @@ fn spawn_overlay(
// Right: Stop button. Tertiary variant — the action is // Right: Stop button. Tertiary variant — the action is
// available but not the loudest element in the banner; the // available but not the loudest element in the banner; the
// "Replay" yellow accent owns that slot. `spawn_modal_button` // "Replay" cyan accent owns that slot. `spawn_modal_button`
// gives us hover / press paint and focus rings for free via // gives us hover / press paint and focus rings for free via
// the existing `UiModalPlugin` paint system. // the existing `UiModalPlugin` paint system.
banner banner