mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 07:32:55 +08:00
Change colour for losers pairings
This commit is contained in:
parent
baefcb9deb
commit
fdccec06b3
@ -65,6 +65,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
pairing.Completed.BindValueChanged(_ => updateProgression());
|
pairing.Completed.BindValueChanged(_ => updateProgression());
|
||||||
pairing.Progression.BindValueChanged(_ => updateProgression());
|
pairing.Progression.BindValueChanged(_ => updateProgression());
|
||||||
pairing.LosersProgression.BindValueChanged(_ => updateProgression());
|
pairing.LosersProgression.BindValueChanged(_ => updateProgression());
|
||||||
|
pairing.Losers.BindValueChanged(_ => updateTeams());
|
||||||
|
|
||||||
updateTeams();
|
updateTeams();
|
||||||
}
|
}
|
||||||
@ -156,8 +157,8 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
|
|
||||||
flow.Children = new[]
|
flow.Children = new[]
|
||||||
{
|
{
|
||||||
new DrawableMatchTeam(Pairing.Team1, Pairing),
|
new DrawableMatchTeam(Pairing.Team1, Pairing, Pairing.Losers),
|
||||||
new DrawableMatchTeam(Pairing.Team2, Pairing)
|
new DrawableMatchTeam(Pairing.Team2, Pairing, Pairing.Losers)
|
||||||
};
|
};
|
||||||
|
|
||||||
SchedulerAfterChildren.Add(() => Scheduler.Add(updateProgression));
|
SchedulerAfterChildren.Add(() => Scheduler.Add(updateProgression));
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
@ -26,6 +24,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
public class DrawableMatchTeam : DrawableTournamentTeam, IHasContextMenu
|
public class DrawableMatchTeam : DrawableTournamentTeam, IHasContextMenu
|
||||||
{
|
{
|
||||||
private readonly MatchPairing pairing;
|
private readonly MatchPairing pairing;
|
||||||
|
private readonly bool losers;
|
||||||
private OsuSpriteText scoreText;
|
private OsuSpriteText scoreText;
|
||||||
private Box background;
|
private Box background;
|
||||||
|
|
||||||
@ -41,10 +40,11 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
[Resolved(CanBeNull = true)]
|
[Resolved(CanBeNull = true)]
|
||||||
private LadderEditorInfo editorInfo { get; set; } = null;
|
private LadderEditorInfo editorInfo { get; set; } = null;
|
||||||
|
|
||||||
public DrawableMatchTeam(Bindable<TournamentTeam> team, MatchPairing pairing)
|
public DrawableMatchTeam(Bindable<TournamentTeam> team, MatchPairing pairing, bool losers)
|
||||||
: base(team)
|
: base(team)
|
||||||
{
|
{
|
||||||
this.pairing = pairing;
|
this.pairing = pairing;
|
||||||
|
this.losers = losers;
|
||||||
Size = new Vector2(150, 40);
|
Size = new Vector2(150, 40);
|
||||||
|
|
||||||
Masking = true;
|
Masking = true;
|
||||||
@ -72,7 +72,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
{
|
{
|
||||||
this.manager = manager;
|
this.manager = manager;
|
||||||
|
|
||||||
colourWinner = colours.BlueDarker;
|
colourWinner = losers ? colours.YellowDarker : colours.BlueDarker;
|
||||||
colourNormal = OsuColour.Gray(0.2f);
|
colourNormal = OsuColour.Gray(0.2f);
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
|
Loading…
Reference in New Issue
Block a user