Update all tournament buttons to use new design

This commit is contained in:
Dean Herbert 2023-07-20 19:08:09 +09:00
parent 0284fa1fc1
commit b712b19539
4 changed files with 11 additions and 13 deletions

View File

@ -13,12 +13,8 @@
using osu.Game.Graphics;
using osu.Game.Online.API;
using osu.Game.Overlays.Settings;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.Drawings.Components;
using osu.Game.Tournament.Screens.Gameplay.Components;
using osu.Game.Tournament.Screens.Ladder.Components;
using osu.Game.Tournament.Screens.TeamIntro;
using osu.Game.Users;
using osuTK;

View File

@ -13,7 +13,6 @@
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Overlays.Settings;
using osu.Game.Tournament.Components;
using osuTK;
@ -42,7 +41,7 @@ protected TournamentEditorScreen(TournamentScreen? parentScreen = null)
}
[BackgroundDependencyLoader]
private void load()
private void load(OsuColour colours)
{
AddRangeInternal(new Drawable[]
{
@ -75,9 +74,10 @@ private void load()
Text = "Add new",
Action = () => Storage.Add(new TModel())
},
new DangerousSettingsButton
new TourneyButton
{
RelativeSizeAxes = Axes.X,
BackgroundColour = colours.Pink3,
Text = "Clear all",
Action = Storage.Clear
},

View File

@ -252,14 +252,13 @@ public ScreenButton(Type type, Key? shortcutKey = null)
if (shortcutKey != null)
{
Add(new Container
Add(new CircularContainer
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,
Size = new Vector2(24),
Margin = new MarginPadding(5),
Masking = true,
CornerRadius = 4,
Alpha = 0.5f,
Blending = BlendingParameters.Additive,
Children = new Drawable[]

View File

@ -1,18 +1,21 @@
// 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.Framework.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings;
namespace osu.Game.Tournament
{
public partial class TourneyButton : OsuButton
public partial class TourneyButton : SettingsButton
{
public new Box Background => base.Background;
public TourneyButton()
: base(null)
[BackgroundDependencyLoader]
private void load()
{
Padding = new MarginPadding();
}
}
}