mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09:00
Fix TeamScoreDisplay
not tracking team changes properly
This commit is contained in:
@ -42,6 +42,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
currentMatch.BindTo(ladder.CurrentMatch);
|
currentMatch.BindTo(ladder.CurrentMatch);
|
||||||
currentMatch.BindValueChanged(matchChanged);
|
currentMatch.BindValueChanged(matchChanged);
|
||||||
|
|
||||||
|
currentTeam.BindValueChanged(teamChanged);
|
||||||
|
|
||||||
updateMatch();
|
updateMatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,7 +69,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
|
|
||||||
// team may change to same team, which means score is not in a good state.
|
// team may change to same team, which means score is not in a good state.
|
||||||
// thus we handle this manually.
|
// thus we handle this manually.
|
||||||
teamChanged(currentTeam.Value);
|
currentTeam.TriggerChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
protected override bool OnMouseDown(MouseDownEvent e)
|
||||||
@ -88,11 +90,11 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
return base.OnMouseDown(e);
|
return base.OnMouseDown(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void teamChanged(TournamentTeam team)
|
private void teamChanged(ValueChangedEvent<TournamentTeam> team)
|
||||||
{
|
{
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
teamDisplay = new TeamDisplay(team, teamColour, currentTeamScore, currentMatch.Value?.PointsToWin ?? 0),
|
teamDisplay = new TeamDisplay(team.NewValue, teamColour, currentTeamScore, currentMatch.Value?.PointsToWin ?? 0),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user