Merge pull request #20094 from peppy/tourney-fix-team-display-scores

Show team scores at the tournament map pool screen
This commit is contained in:
Dan Balasescu 2022-09-07 14:58:14 +09:00 committed by GitHub
commit dbdb311f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
public bool ShowScore public bool ShowScore
{ {
get => teamDisplay.ShowScore;
set => teamDisplay.ShowScore = value; set => teamDisplay.ShowScore = value;
} }
@ -92,10 +93,14 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
private void teamChanged(ValueChangedEvent<TournamentTeam> team) private void teamChanged(ValueChangedEvent<TournamentTeam> team)
{ {
bool wasShowingScores = teamDisplay?.ShowScore ?? false;
InternalChildren = new Drawable[] InternalChildren = new Drawable[]
{ {
teamDisplay = new TeamDisplay(team.NewValue, teamColour, currentTeamScore, currentMatch.Value?.PointsToWin ?? 0), teamDisplay = new TeamDisplay(team.NewValue, teamColour, currentTeamScore, currentMatch.Value?.PointsToWin ?? 0),
}; };
teamDisplay.ShowScore = wasShowingScores;
} }
} }
} }

View File

@ -46,7 +46,10 @@ namespace osu.Game.Tournament.Screens.MapPool
Loop = true, Loop = true,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
}, },
new MatchHeader(), new MatchHeader
{
ShowScores = true,
},
mapFlows = new FillFlowContainer<FillFlowContainer<TournamentBeatmapPanel>> mapFlows = new FillFlowContainer<FillFlowContainer<TournamentBeatmapPanel>>
{ {
Y = 160, Y = 160,