Remove default bindable from the config manager

This commit is contained in:
EVAST9919 2017-10-02 18:09:00 +03:00
parent b6a8587c71
commit c34cc07fda
2 changed files with 10 additions and 10 deletions

View File

@ -69,7 +69,6 @@ protected override void InitialiseDefaults()
Set(OsuSetting.KeyOverlay, false);
Set(OsuSetting.FloatingComments, false);
Set(OsuSetting.PlaybackSpeed, 1.0, 0.5f, 2);
// Update
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
@ -93,7 +92,6 @@ public enum OsuSetting
ShowStoryboard,
KeyOverlay,
FloatingComments,
PlaybackSpeed,
ShowInterface,
MouseDisableButtons,
MouseDisableWheel,

View File

@ -1,9 +1,8 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Framework.Timing;
using osu.Framework.Configuration;
namespace osu.Game.Screens.Play.ReplaySettings
{
@ -11,15 +10,20 @@ public class PlaybackSettings : ReplayGroup
{
protected override string Title => @"playback";
private ReplaySliderBar<double> sliderbar;
private readonly ReplaySliderBar<double> sliderbar;
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
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 = config.GetBindable<double>(OsuSetting.PlaybackSpeed),
Bindable = current,
};
}
@ -27,8 +31,6 @@ public void BindClock(IAdjustableClock clock)
{
var clockRate = clock.Rate;
sliderbar.Bindable.ValueChanged += (rateMultiplier) => clock.Rate = clockRate * rateMultiplier;
sliderbar.Bindable.Value = 1;
}
}
}