I guess this works...

This commit is contained in:
Jorolf
2017-04-21 13:59:04 +02:00
parent 02249dcd67
commit e53c4be356
6 changed files with 42 additions and 44 deletions

View File

@ -1,7 +1,6 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System.Globalization;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
@ -19,11 +18,10 @@ namespace osu.Game.Overlays.Options.Sections.Input
{
Children = new Drawable[]
{
new OptionSlider<double>
new OptionSlider<double,SensitivitySlider>
{
LabelText = "Sensitivity",
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.MouseSpeed),
TooltipText = value => value.ToString(@"0.##x", CultureInfo.InvariantCulture)
Bindable = (BindableDouble)config.GetBindable<double>(OsuConfig.MouseSpeed)
},
new OsuCheckbox
{
@ -57,5 +55,10 @@ namespace osu.Game.Overlays.Options.Sections.Input
},
};
}
private class SensitivitySlider : OsuSliderBar<double>
{
public override string TooltipText => Current.Value.ToString(@"0.##x");
}
}
}