From 4a3f281855784ffaf7bf67f3c1ce5eaa335b8445 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Feb 2020 18:43:47 +0900 Subject: [PATCH] Make buttons purple --- .../Screens/Multi/Match/Components/Footer.cs | 4 +--- .../Match/Components/MatchSettingsOverlay.cs | 7 ++----- .../Match/Components/PurpleTriangleButton.cs | 20 +++++++++++++++++++ osu.Game/Screens/Multi/Multiplayer.cs | 6 ++---- 4 files changed, 25 insertions(+), 12 deletions(-) create mode 100644 osu.Game/Screens/Multi/Match/Components/PurpleTriangleButton.cs diff --git a/osu.Game/Screens/Multi/Match/Components/Footer.cs b/osu.Game/Screens/Multi/Match/Components/Footer.cs index 199563c698..c0c866d815 100644 --- a/osu.Game/Screens/Multi/Match/Components/Footer.cs +++ b/osu.Game/Screens/Multi/Match/Components/Footer.cs @@ -8,7 +8,6 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Game.Graphics; -using osu.Game.Graphics.UserInterface; using osu.Game.Online.Multiplayer; using osuTK; @@ -22,7 +21,6 @@ public class Footer : CompositeDrawable public readonly Bindable SelectedItem = new Bindable(); private readonly Drawable background; - private readonly OsuButton startButton; public Footer() { @@ -32,7 +30,7 @@ public Footer() InternalChildren = new[] { background = new Box { RelativeSizeAxes = Axes.Both }, - startButton = new ReadyButton + new ReadyButton { Anchor = Anchor.Centre, Origin = Anchor.Centre, diff --git a/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs b/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs index e3110cdfc8..97485cd5a1 100644 --- a/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs +++ b/osu.Game/Screens/Multi/Match/Components/MatchSettingsOverlay.cs @@ -226,7 +226,7 @@ private void load(OsuColour colours) }, new Drawable[] { - new OsuButton + new PurpleTriangleButton { RelativeSizeAxes = Axes.X, Height = 40, @@ -447,10 +447,7 @@ public DurationDropdown() Menu.MaxHeight = 100; } - protected override string GenerateItemText(TimeSpan item) - { - return item.Humanize(); - } + protected override string GenerateItemText(TimeSpan item) => item.Humanize(); } } } diff --git a/osu.Game/Screens/Multi/Match/Components/PurpleTriangleButton.cs b/osu.Game/Screens/Multi/Match/Components/PurpleTriangleButton.cs new file mode 100644 index 0000000000..8a0369ceba --- /dev/null +++ b/osu.Game/Screens/Multi/Match/Components/PurpleTriangleButton.cs @@ -0,0 +1,20 @@ +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// See the LICENCE file in the repository root for full licence text. + +using osu.Framework.Allocation; +using osu.Game.Graphics; +using osu.Game.Graphics.UserInterface; + +namespace osu.Game.Screens.Multi.Match.Components +{ + public class PurpleTriangleButton : TriangleButton + { + [BackgroundDependencyLoader] + private void load() + { + BackgroundColour = OsuColour.FromHex(@"593790"); + Triangles.ColourLight = OsuColour.FromHex(@"7247b6"); + Triangles.ColourDark = OsuColour.FromHex(@"593790"); + } + } +} diff --git a/osu.Game/Screens/Multi/Multiplayer.cs b/osu.Game/Screens/Multi/Multiplayer.cs index 235ca9ec04..1219919425 100644 --- a/osu.Game/Screens/Multi/Multiplayer.cs +++ b/osu.Game/Screens/Multi/Multiplayer.cs @@ -24,6 +24,7 @@ using osu.Game.Screens.Multi.Lounge; using osu.Game.Screens.Multi.Lounge.Components; using osu.Game.Screens.Multi.Match; +using osu.Game.Screens.Multi.Match.Components; using osu.Game.Screens.Play; using osuTK; @@ -375,7 +376,7 @@ private class BackgroundSprite : UpdateableBeatmapBackgroundSprite } } - public class CreateRoomButton : TriangleButton + public class CreateRoomButton : PurpleTriangleButton { public CreateRoomButton() { @@ -390,9 +391,6 @@ public CreateRoomButton() [BackgroundDependencyLoader] private void load() { - BackgroundColour = OsuColour.FromHex(@"593790"); - Triangles.ColourLight = OsuColour.FromHex(@"7247b6"); - Triangles.ColourDark = OsuColour.FromHex(@"593790"); Triangles.TriangleScale = 1.5f; Text = "Create room";