mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 18:42:56 +08:00
Change bindable int to float
This commit is contained in:
parent
c52cd02b62
commit
faf8fe132e
@ -114,7 +114,7 @@ namespace osu.Game.Configuration
|
|||||||
|
|
||||||
Set(OsuSetting.UIScale, 1f, 0.8f, 1.6f, 0.01f);
|
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);
|
Set(OsuSetting.IntroSequence, IntroSequence.Triangles);
|
||||||
}
|
}
|
||||||
|
@ -30,12 +30,12 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
public Bindable<double> Progress = new BindableDouble();
|
public Bindable<double> Progress = new BindableDouble();
|
||||||
|
|
||||||
private Bindable<int> holdActivationDelay;
|
private Bindable<float> holdActivationDelay;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
holdActivationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
|
holdActivationDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BeginConfirm()
|
protected void BeginConfirm()
|
||||||
|
@ -27,16 +27,16 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
LabelText = "Parallax",
|
LabelText = "Parallax",
|
||||||
Bindable = config.GetBindable<bool>(OsuSetting.MenuParallax)
|
Bindable = config.GetBindable<bool>(OsuSetting.MenuParallax)
|
||||||
},
|
},
|
||||||
new SettingsSlider<int, TimeSlider>
|
new SettingsSlider<float, TimeSlider>
|
||||||
{
|
{
|
||||||
LabelText = "Hold-to-confirm activation time",
|
LabelText = "Hold-to-confirm activation time",
|
||||||
Bindable = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay),
|
Bindable = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay),
|
||||||
KeyboardStep = 50
|
KeyboardStep = 50
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private class TimeSlider : OsuSliderBar<int>
|
private class TimeSlider : OsuSliderBar<float>
|
||||||
{
|
{
|
||||||
public override string TooltipText => Current.Value.ToString("N0") + "ms";
|
public override string TooltipText => Current.Value.ToString("N0") + "ms";
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
protected override BackgroundScreen CreateBackground() => background;
|
protected override BackgroundScreen CreateBackground() => background;
|
||||||
|
|
||||||
private Bindable<int> holdDelay;
|
private Bindable<float> holdDelay;
|
||||||
private Bindable<bool> loginDisplayed;
|
private Bindable<bool> loginDisplayed;
|
||||||
|
|
||||||
private ExitConfirmOverlay exitConfirmOverlay;
|
private ExitConfirmOverlay exitConfirmOverlay;
|
||||||
@ -70,7 +70,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(DirectOverlay direct, SettingsOverlay settings, OsuConfigManager config, SessionStatics statics)
|
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);
|
loginDisplayed = statics.GetBindable<bool>(Static.LoginOverlayDisplayed);
|
||||||
|
|
||||||
if (host.CanExit)
|
if (host.CanExit)
|
||||||
|
@ -63,11 +63,11 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private OsuConfigManager config { get; set; }
|
private OsuConfigManager config { get; set; }
|
||||||
|
|
||||||
private Bindable<int> activationDelay;
|
private Bindable<float> activationDelay;
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
activationDelay = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay);
|
activationDelay = config.GetBindable<float>(OsuSetting.UIHoldActivationDelay);
|
||||||
activationDelay.BindValueChanged(v =>
|
activationDelay.BindValueChanged(v =>
|
||||||
{
|
{
|
||||||
text.Text = v.NewValue > 0
|
text.Text = v.NewValue > 0
|
||||||
|
Loading…
Reference in New Issue
Block a user