Add setting to adjust hold-to-confirm activation time

This commit is contained in:
Dean Herbert
2019-09-19 14:04:51 +09:00
parent 3710c7bdc4
commit 177a789d79
4 changed files with 27 additions and 13 deletions

View File

@ -2,7 +2,9 @@
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings.Sections.Graphics
{
@ -13,7 +15,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
{
Children = new[]
Children = new Drawable[]
{
new SettingsCheckbox
{
@ -25,7 +27,18 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
LabelText = "Parallax",
Bindable = config.GetBindable<bool>(OsuSetting.MenuParallax)
},
new SettingsSlider<int, TimeSlider>
{
LabelText = "Hold-to-confirm activation time",
Bindable = config.GetBindable<int>(OsuSetting.UIHoldActivationDelay),
KeyboardStep = 50
},
};
}
private class TimeSlider : OsuSliderBar<int>
{
public override string TooltipText => Current.Value.ToString("N0") + "ms";
}
}
}