mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Tint attempt count red when no attempts remain
This commit is contained in:
parent
708d40931b
commit
bffd9162ba
@ -14,6 +14,9 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
private OsuSpriteText attemptDisplay;
|
||||
|
||||
[Resolved]
|
||||
private OsuColour colours { get; set; }
|
||||
|
||||
public RoomLocalUserInfo()
|
||||
{
|
||||
AutoSizeAxes = Axes.Both;
|
||||
@ -54,6 +57,9 @@ namespace osu.Game.Screens.OnlinePlay.Components
|
||||
{
|
||||
int remaining = MaxAttempts.Value.Value - UserScore.Value.PlaylistItemAttempts.Sum(a => a.Attempts);
|
||||
attemptDisplay.Text += $" ({remaining} remaining)";
|
||||
|
||||
if (remaining == 0)
|
||||
attemptDisplay.Colour = colours.RedLight;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user