From d4764824931e7e383f3025568fa861d034c57a0d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 25 Apr 2017 19:07:38 +0900 Subject: [PATCH] Add basic seeking support when a replay is loaded. --- osu.Game/Screens/Play/Player.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 2668c61eee..47c120f363 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -156,6 +156,11 @@ namespace osu.Game.Screens.Play hudOverlay.Progress.Objects = HitRenderer.Objects; hudOverlay.Progress.AudioClock = interpolatedSourceClock; + hudOverlay.Progress.AllowSeeking = HitRenderer.HasReplayLoaded; + hudOverlay.Progress.OnSeek = progress => + { + sourceClock.Seek(progress * track.Length); + }; //bind HitRenderer to ScoreProcessor and ourselves (for a pass situation) HitRenderer.OnAllJudged += onCompletion;