1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Remove unnecessary prefix parameter

This commit is contained in:
Joseph Madamba 2023-07-29 10:40:18 -07:00
parent 9d928c0225
commit 740898dffb

View File

@ -24,12 +24,8 @@ namespace osu.Game.Screens.Play.Break
private readonly OsuSpriteText text;
private readonly OsuSpriteText valueText;
private readonly string prefix;
public BreakInfoLine(LocalisableString name, string prefix = @"")
public BreakInfoLine(LocalisableString name)
{
this.prefix = prefix;
AutoSizeAxes = Axes.Y;
Children = new Drawable[]
{
@ -45,7 +41,7 @@ namespace osu.Game.Screens.Play.Break
{
Anchor = Anchor.Centre,
Origin = Anchor.CentreLeft,
Text = prefix + @"-",
Text = @"-",
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 17),
Margin = new MarginPadding { Left = margin }
}
@ -56,7 +52,7 @@ namespace osu.Game.Screens.Play.Break
private void currentValueChanged(ValueChangedEvent<T> e)
{
LocalisableString newText = LocalisableString.Interpolate($"{prefix}{Format(e.NewValue)}");
LocalisableString newText = Format(e.NewValue);
if (valueText.Text == newText)
return;
@ -82,8 +78,8 @@ namespace osu.Game.Screens.Play.Break
public partial class PercentageBreakInfoLine : BreakInfoLine<double>
{
public PercentageBreakInfoLine(LocalisableString name, string prefix = "")
: base(name, prefix)
public PercentageBreakInfoLine(LocalisableString name)
: base(name)
{
}