Add warning lines

This commit is contained in:
Dean Herbert
2018-12-06 15:49:06 +09:00
parent d5de5d1cb7
commit 09f985c721

View File

@ -4,6 +4,8 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -23,61 +25,76 @@ namespace osu.Game.Overlays.AccountCreation
private const string help_centre_url = "/help/wiki/Help_Centre#login"; private const string help_centre_url = "/help/wiki/Help_Centre#login";
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
private void load(OsuColour colours, APIAccess api, OsuGame game) private void load(OsuColour colours, APIAccess api, OsuGame game, TextureStore textures)
{ {
Child = new FillFlowContainer Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.Both, new Sprite
Direction = FillDirection.Vertical,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding(20),
Spacing = new Vector2(0, 5),
Children = new Drawable[]
{ {
new Container Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Texture = textures.Get(@"Menu/dev-build-footer"),
},
new Sprite
{
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Texture = textures.Get(@"Menu/dev-build-footer"),
},
new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Padding = new MarginPadding(20),
Spacing = new Vector2(0, 5),
Children = new Drawable[]
{ {
RelativeSizeAxes = Axes.X, new Container
Height = 150,
Child = new OsuLogo
{ {
Scale = new Vector2(0.1f), RelativeSizeAxes = Axes.X,
Anchor = Anchor.Centre, Height = 150,
Triangles = false, Child = new OsuLogo
{
Scale = new Vector2(0.1f),
Anchor = Anchor.Centre,
Triangles = false,
},
}, },
}, new OsuSpriteText
new OsuSpriteText {
{ TextSize = 28,
TextSize = 28, Font = "Exo2.0-Light",
Font = "Exo2.0-Light", Anchor = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre,
Origin = Anchor.TopCentre, Colour = Color4.Red,
Colour = Color4.Red, Text = "Warning! 注意!",
Text = "Warning! 注意!", },
}, multiAccountExplanationText = new OsuTextFlowContainer(cp => { cp.TextSize = 12; })
multiAccountExplanationText = new OsuTextFlowContainer(cp => { cp.TextSize = 12; }) {
{ RelativeSizeAxes = Axes.X,
RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y
AutoSizeAxes = Axes.Y },
}, new SettingsButton
new SettingsButton {
{ Text = "Help, I can't access my account!",
Text = "Help, I can't access my account!", Margin = new MarginPadding { Top = 50 },
Margin = new MarginPadding { Top = 50 }, Action = () => game?.OpenUrlExternally(help_centre_url)
Action = () => game?.OpenUrlExternally(help_centre_url) },
}, new DangerousSettingsButton
new DangerousSettingsButton {
{ Text = "I understand. This account isn't for me.",
Text = "I understand. This account isn't for me.", Action = () => Push(new ScreenEntry())
Action = () => Push(new ScreenEntry()) },
}, furtherAssistance = new LinkFlowContainer(cp => { cp.TextSize = 12; })
furtherAssistance = new LinkFlowContainer(cp => { cp.TextSize = 12; }) {
{ Margin = new MarginPadding { Top = 20 },
Margin = new MarginPadding { Top = 20 }, Anchor = Anchor.TopCentre,
Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre,
Origin = Anchor.TopCentre, AutoSizeAxes = Axes.Both
AutoSizeAxes = Axes.Both },
}, }
} }
}; };