mirror of
https://github.com/ppy/osu
synced 2025-03-25 04:18:03 +00: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)
|
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();
|
protected virtual string Format(T count) => count.ToString();
|
||||||
|
Loading…
Reference in New Issue
Block a user