1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00

Change colour for losers pairings

This commit is contained in:
Dean Herbert 2018-09-25 03:55:24 +09:00
parent baefcb9deb
commit fdccec06b3
2 changed files with 7 additions and 6 deletions

View File

@ -65,6 +65,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
pairing.Completed.BindValueChanged(_ => updateProgression());
pairing.Progression.BindValueChanged(_ => updateProgression());
pairing.LosersProgression.BindValueChanged(_ => updateProgression());
pairing.Losers.BindValueChanged(_ => updateTeams());
updateTeams();
}
@ -156,8 +157,8 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
flow.Children = new[]
{
new DrawableMatchTeam(Pairing.Team1, Pairing),
new DrawableMatchTeam(Pairing.Team2, Pairing)
new DrawableMatchTeam(Pairing.Team1, Pairing, Pairing.Losers),
new DrawableMatchTeam(Pairing.Team2, Pairing, Pairing.Losers)
};
SchedulerAfterChildren.Add(() => Scheduler.Add(updateProgression));

View File

@ -2,8 +2,6 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
@ -26,6 +24,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
public class DrawableMatchTeam : DrawableTournamentTeam, IHasContextMenu
{
private readonly MatchPairing pairing;
private readonly bool losers;
private OsuSpriteText scoreText;
private Box background;
@ -41,10 +40,11 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
[Resolved(CanBeNull = true)]
private LadderEditorInfo editorInfo { get; set; } = null;
public DrawableMatchTeam(Bindable<TournamentTeam> team, MatchPairing pairing)
public DrawableMatchTeam(Bindable<TournamentTeam> team, MatchPairing pairing, bool losers)
: base(team)
{
this.pairing = pairing;
this.losers = losers;
Size = new Vector2(150, 40);
Masking = true;
@ -72,7 +72,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
{
this.manager = manager;
colourWinner = colours.BlueDarker;
colourWinner = losers ? colours.YellowDarker : colours.BlueDarker;
colourNormal = OsuColour.Gray(0.2f);
InternalChildren = new Drawable[]