1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 16:25:32 +08:00

Fix HUD using incorrect clock for time display

This commit is contained in:
Dean Herbert 2018-02-27 16:10:21 +09:00
parent 37d2a2c3cc
commit 8e78a7b114
2 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play
private static bool hasShownNotificationOnce; private static bool hasShownNotificationOnce;
public HUDOverlay(ScoreProcessor scoreProcessor, RulesetContainer rulesetContainer, IAdjustableClock seekableClock, WorkingBeatmap working) public HUDOverlay(ScoreProcessor scoreProcessor, RulesetContainer rulesetContainer, WorkingBeatmap working, IClock offsetClock, IAdjustableClock adjustableClock)
{ {
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
@ -66,13 +66,13 @@ namespace osu.Game.Screens.Play
BindRulesetContainer(rulesetContainer); BindRulesetContainer(rulesetContainer);
Progress.Objects = rulesetContainer.Objects; Progress.Objects = rulesetContainer.Objects;
Progress.AudioClock = seekableClock; Progress.AudioClock = offsetClock;
Progress.AllowSeeking = rulesetContainer.HasReplayLoaded; Progress.AllowSeeking = rulesetContainer.HasReplayLoaded;
Progress.OnSeek = pos => seekableClock.Seek(pos); Progress.OnSeek = pos => adjustableClock.Seek(pos);
ModDisplay.Current.BindTo(working.Mods); ModDisplay.Current.BindTo(working.Mods);
PlayerSettingsOverlay.PlaybackSettings.AdjustableClock = seekableClock; PlayerSettingsOverlay.PlaybackSettings.AdjustableClock = adjustableClock;
} }
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]

View File

@ -198,7 +198,7 @@ namespace osu.Game.Screens.Play
AdjustableClock = adjustableClock, AdjustableClock = adjustableClock,
FramedClock = offsetClock, FramedClock = offsetClock,
}, },
hudOverlay = new HUDOverlay(scoreProcessor, RulesetContainer, decoupledClock, working) hudOverlay = new HUDOverlay(scoreProcessor, RulesetContainer, working, offsetClock, adjustableClock)
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre Origin = Anchor.Centre