1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Remove local specifications of triangle colouring

This commit is contained in:
Dean Herbert 2022-11-24 15:18:26 +09:00
parent 4fbca4037c
commit bea2acc60e
9 changed files with 2 additions and 35 deletions

View File

@ -13,8 +13,6 @@ namespace osu.Game.Graphics.UserInterface
private void load(OsuColour colours)
{
BackgroundColour = colours.PinkDark;
Triangles.ColourDark = colours.PinkDarker;
Triangles.ColourLight = colours.Pink;
}
}
}

View File

@ -1,8 +1,6 @@
// 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.
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
@ -22,9 +20,6 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
private void load()
{
BackgroundColour = Color4Extensions.FromHex(@"094c5f");
Triangles.ColourLight = Color4Extensions.FromHex(@"0f7c9b");
Triangles.ColourDark = Color4Extensions.FromHex(@"094c5f");
Triangles.TriangleScale = 1.5f;
}
}
}

View File

@ -16,7 +16,6 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
private void load()
{
SpriteText.Font = SpriteText.Font.With(size: 14);
Triangles.TriangleScale = 1.5f;
}
public bool OnPressed(KeyBindingPressEvent<PlatformAction> e)

View File

@ -15,8 +15,6 @@ namespace osu.Game.Screens.OnlinePlay.Match.Components
private void load()
{
BackgroundColour = Color4Extensions.FromHex(@"593790");
Triangles.ColourLight = Color4Extensions.FromHex(@"7247b6");
Triangles.ColourDark = Color4Extensions.FromHex(@"593790");
}
}
}

View File

@ -475,8 +475,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
private void load(OsuColour colours)
{
BackgroundColour = colours.Yellow;
Triangles.ColourLight = colours.YellowLight;
Triangles.ColourDark = colours.YellowDark;
}
}

View File

@ -12,7 +12,6 @@ using osu.Framework.Audio.Sample;
using osu.Framework.Localisation;
using osu.Framework.Threading;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
using osu.Game.Online.Multiplayer;
using osu.Game.Screens.OnlinePlay.Components;
@ -20,8 +19,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
{
public class MultiplayerReadyButton : ReadyButton
{
public new Triangles Triangles => base.Triangles;
[Resolved]
private MultiplayerClient multiplayerClient { get; set; }
@ -212,15 +209,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
void setYellow()
{
BackgroundColour = colours.YellowDark;
Triangles.ColourDark = colours.YellowDark;
Triangles.ColourLight = colours.Yellow;
}
void setGreen()
{
BackgroundColour = colours.Green;
Triangles.ColourDark = colours.Green;
Triangles.ColourLight = colours.GreenLight;
}
}

View File

@ -7,7 +7,6 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer;
using osuTK;
@ -24,11 +23,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
private IBindable<bool> operationInProgress;
private readonly ButtonWithTrianglesExposed button;
private readonly TriangleButton button;
public MultiplayerSpectateButton()
{
InternalChild = button = new ButtonWithTrianglesExposed
InternalChild = button = new TriangleButton
{
RelativeSizeAxes = Axes.Both,
Size = Vector2.One,
@ -67,15 +66,11 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
default:
button.Text = "Spectate";
button.BackgroundColour = colours.BlueDark;
button.Triangles.ColourDark = colours.BlueDarker;
button.Triangles.ColourLight = colours.Blue;
break;
case MultiplayerUserState.Spectating:
button.Text = "Stop spectating";
button.BackgroundColour = colours.Gray4;
button.Triangles.ColourDark = colours.Gray5;
button.Triangles.ColourLight = colours.Gray6;
break;
}
@ -83,10 +78,5 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer.Match
&& Client.Room.State != MultiplayerRoomState.Closed
&& !operationInProgress.Value;
}
private class ButtonWithTrianglesExposed : TriangleButton
{
public new Triangles Triangles => base.Triangles;
}
}
}

View File

@ -38,8 +38,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
private void load(OsuColour colours)
{
BackgroundColour = colours.Green;
Triangles.ColourDark = colours.Green;
Triangles.ColourLight = colours.GreenLight;
}
private bool hasRemainingAttempts = true;

View File

@ -425,8 +425,6 @@ namespace osu.Game.Screens.OnlinePlay.Playlists
private void load(OsuColour colours)
{
BackgroundColour = colours.Yellow;
Triangles.ColourLight = colours.YellowLight;
Triangles.ColourDark = colours.YellowDark;
}
}