mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:23:21 +08:00
Fix initial visual state of positions before sort
runs
This commit is contained in:
parent
0a520c979e
commit
d59befc9d3
@ -62,17 +62,21 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
private int? scorePosition;
|
||||
|
||||
private bool scorePositionIsSet;
|
||||
|
||||
public int? ScorePosition
|
||||
{
|
||||
get => scorePosition;
|
||||
set
|
||||
{
|
||||
if (value == scorePosition)
|
||||
// We always want to run once, as the incoming value may be null and require a visual update to "-".
|
||||
if (value == scorePosition && scorePositionIsSet)
|
||||
return;
|
||||
|
||||
scorePosition = value;
|
||||
|
||||
positionText.Text = scorePosition.HasValue ? $"#{scorePosition.Value.FormatRank()}" : "-";
|
||||
scorePositionIsSet = true;
|
||||
|
||||
updateState();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user