mirror of https://github.com/ppy/osu
Change bindable int to float
This commit is contained in:
parent
c52cd02b62
commit
faf8fe132e
|
@ -114,7 +114,7 @@ protected override void InitialiseDefaults()
|
|||
|
||||
Set(OsuSetting.UIScale, 1f, 0.8f, 1.6f, 0.01f);
|
||||
|
||||
Set(OsuSetting.UIHoldActivationDelay, 200, 0, 500);
|
||||
Set(OsuSetting.UIHoldActivationDelay, 200f, 0f, 500f, 50f);
|
||||
|
||||
Set(OsuSetting.IntroSequence, IntroSequence.Triangles);
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@ public abstract class HoldToConfirmContainer : Container
|
|||
|
||||
public Bindable<double> Progress = new BindableDouble();
|
||||
|
||||
private Bindable<int> holdActivationDelay;
|
||||
private Bindable<float> holdActivationDelay;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
holdActivationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
|
||||
holdActivationDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||
}
|
||||
|
||||
protected void BeginConfirm()
|
||||
|
|
|
@ -27,16 +27,16 @@ private void load(OsuConfigManager config)
|
|||
LabelText = "Parallax",
|
||||
Bindable = config.GetBindable<bool>(OsuSetting.MenuParallax)
|
||||
},
|
||||
new SettingsSlider<int, TimeSlider>
|
||||
new SettingsSlider<float, TimeSlider>
|
||||
{
|
||||
LabelText = "Hold-to-confirm activation time",
|
||||
Bindable = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay),
|
||||
Bindable = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay),
|
||||
KeyboardStep = 50
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
private class TimeSlider : OsuSliderBar<int>
|
||||
private class TimeSlider : OsuSliderBar<float>
|
||||
{
|
||||
public override string TooltipText => Current.Value.ToString("N0") + "ms";
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class MainMenu : OsuScreen
|
|||
|
||||
protected override BackgroundScreen CreateBackground() => background;
|
||||
|
||||
private Bindable<int> holdDelay;
|
||||
private Bindable<float> holdDelay;
|
||||
private Bindable<bool> loginDisplayed;
|
||||
|
||||
private ExitConfirmOverlay exitConfirmOverlay;
|
||||
|
@ -70,7 +70,7 @@ public class MainMenu : OsuScreen
|
|||
[BackgroundDependencyLoader(true)]
|
||||
private void load(DirectOverlay direct, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics)
|
||||
{
|
||||
holdDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
|
||||
holdDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
|
||||
|
||||
if (host.CanExit)
|
||||
|
|
|
@ -63,11 +63,11 @@ public HoldForMenuButton()
|
|||
[Resolved]
|
||||
private OsuConfigManager config { get; set; }
|
||||
|
||||
private Bindable<int> activationDelay;
|
||||
private Bindable<float> activationDelay;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
|
||||
activationDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||
activationDelay.BindValueChanged(v =>
|
||||
{
|
||||
text.Text = v.NewValue > 0
|
||||
|
|
Loading…
Reference in New Issue