mirror of
https://github.com/ppy/osu.git
synced 2025-02-26 18:42:56 +08:00
Fix code quality issues
This commit is contained in:
parent
2ab11ab568
commit
d2a6235135
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user