From 9891ae4ba3d16cf96383e78e159ed1facdaf5d71 Mon Sep 17 00:00:00 2001 From: funman300 Date: Thu, 7 May 2026 18:45:02 -0700 Subject: [PATCH] refactor(engine): final hint-highlight + replay-overlay token cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- solitaire_engine/src/input_plugin.rs | 9 ++++++--- solitaire_engine/src/replay_overlay.rs | 7 ++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/solitaire_engine/src/input_plugin.rs b/solitaire_engine/src/input_plugin.rs index c22a6e5..a02a1bd 100644 --- a/solitaire_engine/src/input_plugin.rs +++ b/solitaire_engine/src/input_plugin.rs @@ -35,7 +35,7 @@ use crate::card_plugin::{ CardEntity, HintHighlight, HintHighlightTimer, STACK_FAN_FRAC, TABLEAU_FACEDOWN_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 crate::challenge_plugin::CHALLENGE_UNLOCK_LEVEL; use crate::events::{ @@ -335,8 +335,11 @@ pub fn emit_hint_visuals( for (entity, card_entity, mut sprite) in card_entities.iter_mut() { if card_entity.card_id == card_id { // Tint the card gold without replacing the Sprite (which would - // discard the image handle set by CardImageSet). - sprite.color = Color::srgba(1.0, 1.0, 0.4, 1.0); + // discard the image handle set by CardImageSet). Uses the + // 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) .insert(HintHighlight { remaining: 2.0 }) .insert(HintHighlightTimer(2.0)); diff --git a/solitaire_engine/src/replay_overlay.rs b/solitaire_engine/src/replay_overlay.rs index 0c89c6c..a9eee2e 100644 --- a/solitaire_engine/src/replay_overlay.rs +++ b/solitaire_engine/src/replay_overlay.rs @@ -208,8 +208,9 @@ fn spawn_overlay( GlobalZIndex(Z_REPLAY_OVERLAY), )) .with_children(|banner| { - // Left: "Replay" label in the loud yellow accent so it reads - // unmistakably as a non-gameplay surface. + // Left: "Replay" label in the cyan primary accent + // (`ACCENT_PRIMARY`) so it reads unmistakably as a + // non-gameplay surface. banner.spawn(( ReplayOverlayBannerText, Text::new(banner_label), @@ -236,7 +237,7 @@ fn spawn_overlay( // Right: Stop button. Tertiary variant — the action is // 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 // the existing `UiModalPlugin` paint system. banner