Skip to main content

paint_border_flash

Function paint_border_flash 

Source
pub fn paint_border_flash(
    frame: &mut Frame<'_>,
    area: Rect,
    state: &GameState,
    tint: (f32, f32, f32),
    cycle: f32,
    strength: f32,
)
Expand description

Recolor the rectangular border of area by walking it cell-by-cell with the same wave-tint logic as draw_animated, but driven by a single (tint, strength) pair. Used to flash secondary panel borders (Fingerers / Upgrades sidebar) on purchase events so the whole panel reads as “something just happened here”, not just the row that changed.

Caller is expected to have already rendered a Block::bordered() over area; this only mutates color/style of the existing border cells.