mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:23:02 +08:00
Reset text only if it has been changed
This commit is contained in:
parent
0615f375e1
commit
94269e119e
@ -54,7 +54,12 @@ namespace osu.Game.Screens.Play.BreaksOverlay
|
||||
|
||||
private void currentValueChanged(T newValue)
|
||||
{
|
||||
valueText.Text = prefix + Format(newValue);
|
||||
var newText = prefix + Format(newValue);
|
||||
|
||||
if (valueText.Text == newText)
|
||||
return;
|
||||
|
||||
valueText.Text = newText;
|
||||
}
|
||||
|
||||
protected virtual string Format(T count) => count.ToString();
|
||||
|
Loading…
Reference in New Issue
Block a user