mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 09:37:23 +08:00
Remove unnecessary text comparison
This commit is contained in:
parent
740898dffb
commit
6ebfafa9c3
@ -47,17 +47,7 @@ namespace osu.Game.Screens.Play.Break
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Current.ValueChanged += currentValueChanged;
|
Current.ValueChanged += text => valueText.Text = Format(text.NewValue);
|
||||||
}
|
|
||||||
|
|
||||||
private void currentValueChanged(ValueChangedEvent<T> e)
|
|
||||||
{
|
|
||||||
LocalisableString newText = Format(e.NewValue);
|
|
||||||
|
|
||||||
if (valueText.Text == newText)
|
|
||||||
return;
|
|
||||||
|
|
||||||
valueText.Text = newText;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual LocalisableString Format(T count)
|
protected virtual LocalisableString Format(T count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user