Revert "Update all usages of OsuSlider.TooltipText overrides to instead implement GetTooltipText"

This reverts commit abba49fd8f.
This commit is contained in:
Dean Herbert 2022-03-05 22:37:36 +09:00
parent bbc2b36117
commit 524b8e02ef
10 changed files with 11 additions and 15 deletions

View File

@ -48,7 +48,7 @@ namespace osu.Game.Rulesets.Mania
private class TimeSlider : OsuSliderBar<double>
{
protected override LocalisableString GetTooltipText(double value) => $"{value:N0} ms";
public override LocalisableString TooltipText => Current.Value.ToString(@"N0") + "ms";
}
}
}

View File

@ -40,7 +40,7 @@ namespace osu.Game.Graphics.UserInterface
private readonly Box rightBox;
private readonly Container nubContainer;
public LocalisableString TooltipText { get; private set; }
public virtual LocalisableString TooltipText { get; private set; }
/// <summary>
/// Whether to format the tooltip as a percentage or the actual value.

View File

@ -38,7 +38,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
private class OffsetSlider : OsuSliderBar<double>
{
protected override LocalisableString GetTooltipText(double value) => value.ToString(@"0ms");
public override LocalisableString TooltipText => Current.Value.ToString(@"0ms");
}
}
}

View File

@ -240,7 +240,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private class UIScaleSlider : OsuSliderBar<float>
{
protected override LocalisableString GetTooltipText(float value) => $"{base.GetTooltipText(value)}x";
public override LocalisableString TooltipText => base.TooltipText + "x";
}
private class ResolutionSettingsDropdown : SettingsDropdown<Size>

View File

@ -135,9 +135,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
private class SensitivitySlider : OsuSliderBar<double>
{
protected override LocalisableString GetTooltipText(double value) => Current.Disabled
? MouseSettingsStrings.EnableHighPrecisionForSensitivityAdjust
: $"{base.GetTooltipText(value)}x";
public override LocalisableString TooltipText => Current.Disabled ? MouseSettingsStrings.EnableHighPrecisionForSensitivityAdjust : $"{base.TooltipText}x";
}
}
}

View File

@ -11,6 +11,6 @@ namespace osu.Game.Overlays.Settings.Sections
/// </summary>
internal class SizeSlider : OsuSliderBar<float>
{
protected override LocalisableString GetTooltipText(float value) => value.ToString(@"0.##x");
public override LocalisableString TooltipText => Current.Value.ToString(@"0.##x");
}
}

View File

@ -46,7 +46,7 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
private class TimeSlider : OsuSliderBar<float>
{
protected override LocalisableString GetTooltipText(float value) => $"{value:N0} ms";
public override LocalisableString TooltipText => Current.Value.ToString(@"N0") + "ms";
}
}
}

View File

@ -64,14 +64,12 @@ namespace osu.Game.Overlays.Settings.Sections.UserInterface
private class MaximumStarsSlider : StarsSlider
{
protected override LocalisableString GetTooltipText(double value) => Current.IsDefault
? UserInterfaceStrings.NoLimit
: base.GetTooltipText(value);
public override LocalisableString TooltipText => Current.IsDefault ? UserInterfaceStrings.NoLimit : base.TooltipText;
}
private class StarsSlider : OsuSliderBar<double>
{
protected override LocalisableString GetTooltipText(double value) => $"{value:0.##} stars";
public override LocalisableString TooltipText => Current.Value.ToString(@"0.## stars");
}
}
}

View File

@ -111,6 +111,6 @@ namespace osu.Game.Rulesets.Mods
public class MuteComboSlider : OsuSliderBar<int>
{
protected override LocalisableString GetTooltipText(int value) => value == 0 ? "always muted" : base.GetTooltipText(value);
public override LocalisableString TooltipText => Current.Value == 0 ? "always muted" : base.TooltipText;
}
}

View File

@ -57,6 +57,6 @@ namespace osu.Game.Rulesets.Mods
public class HiddenComboSlider : OsuSliderBar<int>
{
protected override LocalisableString GetTooltipText(int value) => value == 0 ? "always hidden" : base.GetTooltipText(value);
public override LocalisableString TooltipText => Current.Value == 0 ? "always hidden" : base.TooltipText;
}
}