Make buttons purple

This commit is contained in:
Dean Herbert 2020-02-20 18:43:47 +09:00
parent a0b578082e
commit 4a3f281855
4 changed files with 25 additions and 12 deletions

View File

@ -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<PlaylistItem> SelectedItem = new Bindable<PlaylistItem>();
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,

View File

@ -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();
}
}
}

View File

@ -0,0 +1,20 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. 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");
}
}
}

View File

@ -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";