1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Display "no limit" for maximum stars

This commit is contained in:
smoogipoo 2020-01-24 19:08:14 +09:00
parent 9e0e7be8d0
commit 62fa619ad4

View File

@ -34,7 +34,7 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
KeyboardStep = 0.1f, KeyboardStep = 0.1f,
Keywords = new[] { "star", "difficulty" } Keywords = new[] { "star", "difficulty" }
}, },
new SettingsSlider<double, StarSlider> new SettingsSlider<double, MaximumStarsSlider>
{ {
LabelText = "up to", LabelText = "up to",
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum), Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
@ -49,6 +49,11 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
}; };
} }
private class MaximumStarsSlider : StarSlider
{
public override string TooltipText => Current.IsDefault ? "no limit" : base.TooltipText;
}
private class StarSlider : OsuSliderBar<double> private class StarSlider : OsuSliderBar<double>
{ {
public override string TooltipText => Current.Value.ToString(@"0.## stars"); public override string TooltipText => Current.Value.ToString(@"0.## stars");