Make ready button also have triangles

This commit is contained in:
Dean Herbert
2020-02-20 18:39:10 +09:00
parent e7fca689b1
commit a0b578082e
2 changed files with 7 additions and 3 deletions

View File

@ -47,7 +47,6 @@ namespace osu.Game.Screens.Multi.Match.Components
private void load(OsuColour colours) private void load(OsuColour colours)
{ {
background.Colour = OsuColour.FromHex(@"28242d"); background.Colour = OsuColour.FromHex(@"28242d");
startButton.BackgroundColour = colours.Green;
} }
} }
} }

View File

@ -6,12 +6,13 @@ using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer;
namespace osu.Game.Screens.Multi.Match.Components namespace osu.Game.Screens.Multi.Match.Components
{ {
public class ReadyButton : OsuButton public class ReadyButton : TriangleButton
{ {
public readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>(); public readonly Bindable<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
@ -32,12 +33,16 @@ namespace osu.Game.Screens.Multi.Match.Components
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load(OsuColour colours)
{ {
beatmaps.ItemAdded += beatmapAdded; beatmaps.ItemAdded += beatmapAdded;
beatmaps.ItemRemoved += beatmapRemoved; beatmaps.ItemRemoved += beatmapRemoved;
SelectedItem.BindValueChanged(item => updateSelectedItem(item.NewValue), true); SelectedItem.BindValueChanged(item => updateSelectedItem(item.NewValue), true);
BackgroundColour = colours.Green;
Triangles.ColourDark = colours.Green;
Triangles.ColourLight = colours.GreenLight;
} }
private void updateSelectedItem(PlaylistItem item) private void updateSelectedItem(PlaylistItem item)