1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Fix scores fading out on entering gameplay screen

This commit is contained in:
Bartłomiej Dach 2021-04-03 22:24:55 +02:00
parent 0d9793797f
commit 0febefd8eb

View File

@ -14,9 +14,21 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
{
private readonly TeamScore score;
private bool showScore;
public bool ShowScore
{
set => score.FadeTo(value ? 1 : 0, 200);
get => showScore;
set
{
if (showScore == value)
return;
showScore = value;
if (IsLoaded)
score.FadeTo(value ? 1 : 0, 200);
}
}
public TeamDisplay(TournamentTeam team, TeamColour colour, Bindable<int?> currentTeamScore, int pointsToWin)
@ -92,5 +104,11 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
}
};
}
protected override void LoadComplete()
{
base.LoadComplete();
score.Alpha = ShowScore ? 1 : 0;
}
}
}