feat(settings,engine): replay-playback rate slider in Settings → Gameplay
The replay overlay's per-move tick rate has been hardcoded at REPLAY_MOVE_INTERVAL_SECS = 0.45 s/move since the in-engine playback shipped. Power users want to scrub faster through older wins. Adds a Settings slider that tunes the interval 0.10–1.00 s in 0.05 s steps; default 0.45 s preserves existing feel. Settings.replay_move_interval_secs uses #[serde(default)] so legacy files load to 0.45. sanitized() clamps out-of-range values. tick_replay_playback now reads SettingsResource per frame and falls back to the constant when the resource is absent (test fixtures). The slider takes effect on the very next playback tick — no need to restart playback. Mirrors the existing tooltip-delay slider exactly: SettingsButton:: ReplayMoveIntervalUp/Down variants, the same `slider_row` pattern, the same per-tick repaint system shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -141,7 +141,8 @@ pub use challenge::{challenge_count, challenge_seed_for, CHALLENGE_SEEDS};
|
||||
pub mod settings;
|
||||
pub use settings::{
|
||||
load_settings_from, save_settings_to, settings_file_path, AnimSpeed, Settings, SyncBackend,
|
||||
Theme, WindowGeometry, SOLVER_DEAL_RETRY_CAP, TIME_BONUS_MULTIPLIER_MAX,
|
||||
Theme, WindowGeometry, REPLAY_MOVE_INTERVAL_MAX_SECS, REPLAY_MOVE_INTERVAL_MIN_SECS,
|
||||
REPLAY_MOVE_INTERVAL_STEP_SECS, SOLVER_DEAL_RETRY_CAP, TIME_BONUS_MULTIPLIER_MAX,
|
||||
TIME_BONUS_MULTIPLIER_MIN, TIME_BONUS_MULTIPLIER_STEP, TOOLTIP_DELAY_MAX_SECS,
|
||||
TOOLTIP_DELAY_MIN_SECS, TOOLTIP_DELAY_STEP_SECS,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user