mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Remove the dangerous function
This commit is contained in:
@ -222,7 +222,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
hudOverlay.ModDisplay.Current.BindTo(working.Mods);
|
hudOverlay.ModDisplay.Current.BindTo(working.Mods);
|
||||||
|
|
||||||
hudOverlay.ReplaySettingsOverlay.PlaybackSettings.BindClock(adjustableSourceClock);
|
hudOverlay.ReplaySettingsOverlay.PlaybackSettings.AdjustableClock = adjustableSourceClock;
|
||||||
|
|
||||||
// Bind ScoreProcessor to ourselves
|
// Bind ScoreProcessor to ourselves
|
||||||
scoreProcessor.AllJudged += onCompletion;
|
scoreProcessor.AllJudged += onCompletion;
|
||||||
|
@ -10,6 +10,13 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
|||||||
{
|
{
|
||||||
protected override string Title => @"playback";
|
protected override string Title => @"playback";
|
||||||
|
|
||||||
|
private IAdjustableClock adjustableClock;
|
||||||
|
public IAdjustableClock AdjustableClock
|
||||||
|
{
|
||||||
|
set { adjustableClock = value; }
|
||||||
|
get { return adjustableClock; }
|
||||||
|
}
|
||||||
|
|
||||||
private readonly ReplaySliderBar<double> sliderbar;
|
private readonly ReplaySliderBar<double> sliderbar;
|
||||||
|
|
||||||
public PlaybackSettings()
|
public PlaybackSettings()
|
||||||
@ -25,10 +32,15 @@ namespace osu.Game.Screens.Play.ReplaySettings
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindClock(IAdjustableClock clock)
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
var clockRate = clock.Rate;
|
base.LoadComplete();
|
||||||
sliderbar.Bindable.ValueChanged += rateMultiplier => clock.Rate = clockRate * rateMultiplier;
|
|
||||||
|
if (adjustableClock != null)
|
||||||
|
{
|
||||||
|
var clockRate = adjustableClock.Rate;
|
||||||
|
sliderbar.Bindable.ValueChanged += rateMultiplier => adjustableClock.Rate = clockRate * rateMultiplier;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user