mirror of
https://github.com/ppy/osu.git
synced 2024-11-14 18:47:27 +08:00
Add basic seeking support when a replay is loaded.
This commit is contained in:
parent
eb5d334838
commit
d476482493
@ -156,6 +156,11 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
hudOverlay.Progress.Objects = HitRenderer.Objects;
|
hudOverlay.Progress.Objects = HitRenderer.Objects;
|
||||||
hudOverlay.Progress.AudioClock = interpolatedSourceClock;
|
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)
|
//bind HitRenderer to ScoreProcessor and ourselves (for a pass situation)
|
||||||
HitRenderer.OnAllJudged += onCompletion;
|
HitRenderer.OnAllJudged += onCompletion;
|
||||||
|
Loading…
Reference in New Issue
Block a user