1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 07:22:55 +08:00
This commit is contained in:
EVAST9919 2017-10-02 18:19:55 +03:00
parent c34cc07fda
commit 4a298098c5

View File

@ -12,25 +12,23 @@ namespace osu.Game.Screens.Play.ReplaySettings
private readonly ReplaySliderBar<double> sliderbar;
private readonly BindableNumber<double> current;
public PlaybackSettings()
{
current = new BindableDouble(1) as BindableNumber<double>;
current.MinValue = 0.5;
current.MaxValue = 2;
Child = sliderbar = new ReplaySliderBar<double>
{
LabelText = "Playback speed",
Bindable = current,
Bindable = new BindableDouble(1)
{
MinValue = 0.5,
MaxValue = 2
},
};
}
public void BindClock(IAdjustableClock clock)
{
var clockRate = clock.Rate;
sliderbar.Bindable.ValueChanged += (rateMultiplier) => clock.Rate = clockRate * rateMultiplier;
sliderbar.Bindable.ValueChanged += rateMultiplier => clock.Rate = clockRate * rateMultiplier;
}
}
}