bug(time-attack): timer does not pause when Home or Win overlay is open #54
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
In
time_attack_plugin.rs, the countdown timer only stops when the game'spausedresource haspaused.is_some_and(|p| p.0). Opening the Home menu or the Win overlay sets a different state and does not set this pause flag, so the timer continues to count down while the overlay is visible.Affected file
solitaire_engine/src/time_attack_plugin.rsExpected behaviour
The timer should pause whenever any full-screen overlay (Home, Win summary, Settings, etc.) is open, not only when the explicit pause flag is set.
Fix
Check
GameState/ screen state in the timer update system and return early when any modal or overlay is active, OR hook into the same system that pauses background systems during overlays.