Update first-run overlay footer buttons to use new sheared design

This commit is contained in:
Dean Herbert 2022-04-29 23:45:17 +09:00
parent 670b51324e
commit 27ee990359

View File

@ -25,7 +25,6 @@ using osu.Game.Overlays.Mods;
using osu.Game.Overlays.Notifications; using osu.Game.Overlays.Notifications;
using osu.Game.Screens; using osu.Game.Screens;
using osu.Game.Screens.Menu; using osu.Game.Screens.Menu;
using osu.Game.Screens.OnlinePlay.Match.Components;
namespace osu.Game.Overlays namespace osu.Game.Overlays
{ {
@ -45,8 +44,8 @@ namespace osu.Game.Overlays
private ScreenStack? stack; private ScreenStack? stack;
public PurpleTriangleButton NextButton = null!; public ShearedButton NextButton = null!;
public DangerousTriangleButton BackButton = null!; public ShearedButton BackButton = null!;
private readonly Bindable<bool> showFirstRunSetup = new Bindable<bool>(); private readonly Bindable<bool> showFirstRunSetup = new Bindable<bool>();
@ -72,7 +71,7 @@ namespace osu.Game.Overlays
private Container content = null!; private Container content = null!;
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load(OsuColour colours)
{ {
Header.Title = FirstRunSetupOverlayStrings.FirstRunSetupTitle; Header.Title = FirstRunSetupOverlayStrings.FirstRunSetupTitle;
Header.Description = FirstRunSetupOverlayStrings.FirstRunSetupDescription; Header.Description = FirstRunSetupOverlayStrings.FirstRunSetupDescription;
@ -84,7 +83,11 @@ namespace osu.Game.Overlays
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Padding = new MarginPadding { Horizontal = 70 * 1.2f }, Padding = new MarginPadding
{
Horizontal = 70 * 1.2f,
Bottom = 20,
},
Child = new InputBlockingContainer Child = new InputBlockingContainer
{ {
Masking = true, Masking = true,
@ -117,14 +120,15 @@ namespace osu.Game.Overlays
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y, AutoSizeAxes = Axes.Y,
Width = 0.98f, Margin = new MarginPadding { Vertical = PADDING },
Anchor = Anchor.Centre, Anchor = Anchor.BottomLeft,
Origin = Anchor.Centre, Origin = Anchor.BottomLeft,
ColumnDimensions = new[] ColumnDimensions = new[]
{ {
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.Absolute, 10), new Dimension(GridSizeMode.Absolute, 10),
new Dimension(GridSizeMode.AutoSize),
new Dimension(), new Dimension(),
new Dimension(GridSizeMode.Absolute, 10),
}, },
RowDimensions = new[] RowDimensions = new[]
{ {
@ -134,21 +138,25 @@ namespace osu.Game.Overlays
{ {
new[] new[]
{ {
BackButton = new DangerousTriangleButton Empty(),
BackButton = new ShearedButton(300)
{ {
Width = 300,
Text = CommonStrings.Back, Text = CommonStrings.Back,
Action = showPreviousStep, Action = showPreviousStep,
Enabled = { Value = false }, Enabled = { Value = false },
DarkerColour = colours.Pink2,
LighterColour = colours.Pink1,
}, },
Empty(), NextButton = new ShearedButton(0)
NextButton = new PurpleTriangleButton
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Width = 1, Width = 1,
Text = FirstRunSetupOverlayStrings.GetStarted, Text = FirstRunSetupOverlayStrings.GetStarted,
DarkerColour = ColourProvider.Colour2,
LighterColour = ColourProvider.Colour1,
Action = showNextStep Action = showNextStep
} },
Empty(),
}, },
} }
}); });