1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-30 06:12:58 +08:00

Update line colours to match bracket type

This commit is contained in:
Dean Herbert 2018-09-25 04:58:34 +09:00
parent 40ec24c721
commit fbda872a53

View File

@ -3,12 +3,14 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Caching; using osu.Framework.Caching;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Lines; using osu.Framework.Graphics.Lines;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components; using osu.Game.Tournament.Components;
using osu.Game.Tournament.Screens.Ladder.Components; using osu.Game.Tournament.Screens.Ladder.Components;
@ -144,6 +146,16 @@ namespace osu.Game.Tournament.Screens.Ladder
updateLayout(); updateLayout();
} }
private Color4 normalPathColour;
private Color4 losersPathColour;
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
normalPathColour = colours.BlueDarker.Darken(2);
losersPathColour = colours.YellowDarker.Darken(2);
}
private void updateLayout() private void updateLayout()
{ {
paths.Clear(); paths.Clear();
@ -162,7 +174,7 @@ namespace osu.Game.Tournament.Screens.Ladder
// clean up outdated progressions. // clean up outdated progressions.
pairing.Pairing.Progression.Value = null; pairing.Pairing.Progression.Value = null;
else else
paths.Add(new ProgressionPath(pairing, dest)); paths.Add(new ProgressionPath(pairing, dest) { Colour = pairing.Pairing.Losers ? losersPathColour : normalPathColour });
} }
} }