1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-26 22:43:21 +08:00

Fix code quality issues

This commit is contained in:
Dean Herbert 2023-09-07 14:19:15 +09:00
parent 2ab11ab568
commit d2a6235135
2 changed files with 7 additions and 12 deletions

View File

@ -82,7 +82,7 @@ namespace osu.Game.Graphics.UserInterface
channel.Play();
}
protected LocalisableString getTooltipText(T value)
private LocalisableString getTooltipText(T value)
{
if (CurrentNumber.IsInteger)
return value.ToInt32(NumberFormatInfo.InvariantInfo).ToString("N0");

View File

@ -44,7 +44,7 @@ namespace osu.Game.Rulesets.Mods
return;
minValue = value;
updateMinValue();
updateExtents();
}
}
@ -58,7 +58,7 @@ namespace osu.Game.Rulesets.Mods
return;
maxValue = value;
updateMaxValue();
updateExtents();
}
}
@ -75,7 +75,7 @@ namespace osu.Game.Rulesets.Mods
return;
extendedMinValue = value;
updateMinValue();
updateExtents();
}
}
@ -92,7 +92,7 @@ namespace osu.Game.Rulesets.Mods
return;
extendedMaxValue = value;
updateMaxValue();
updateExtents();
}
}
@ -104,8 +104,7 @@ namespace osu.Game.Rulesets.Mods
public DifficultyBindable(float? defaultValue = null)
: base(defaultValue)
{
ExtendedLimits.BindValueChanged(_ => updateMinValue());
ExtendedLimits.BindValueChanged(_ => updateMaxValue());
ExtendedLimits.BindValueChanged(_ => updateExtents());
}
public override float? Value
@ -121,13 +120,9 @@ namespace osu.Game.Rulesets.Mods
}
}
private void updateMinValue()
private void updateExtents()
{
CurrentNumber.MinValue = ExtendedLimits.Value && extendedMinValue != null ? extendedMinValue.Value : minValue;
}
private void updateMaxValue()
{
CurrentNumber.MaxValue = ExtendedLimits.Value && extendedMaxValue != null ? extendedMaxValue.Value : maxValue;
}