2017-02-17 11:07:11 +00:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
|
|
|
|
using osu.Framework.Allocation;
|
2017-02-18 05:16:46 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-02-17 11:07:11 +00:00
|
|
|
|
using osu.Framework.Screens;
|
2017-02-18 05:16:46 +00:00
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
using OpenTK;
|
|
|
|
|
using OpenTK.Graphics;
|
2017-02-17 11:07:11 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens.Menu
|
|
|
|
|
{
|
2017-03-07 01:59:19 +00:00
|
|
|
|
internal class Disclaimer : OsuScreen
|
2017-02-17 11:07:11 +00:00
|
|
|
|
{
|
|
|
|
|
private Intro intro;
|
2017-08-03 05:36:21 +00:00
|
|
|
|
private readonly SpriteIcon icon;
|
2017-02-18 05:16:46 +00:00
|
|
|
|
private Color4 iconColour;
|
|
|
|
|
|
2017-02-17 11:07:11 +00:00
|
|
|
|
internal override bool ShowOverlays => false;
|
|
|
|
|
|
2017-03-18 16:59:13 +00:00
|
|
|
|
internal override bool HasLocalCursorDisplayed => true;
|
2017-03-16 14:58:36 +00:00
|
|
|
|
|
2017-02-18 05:16:46 +00:00
|
|
|
|
public Disclaimer()
|
|
|
|
|
{
|
|
|
|
|
ValidForResume = false;
|
|
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2017-03-01 18:33:01 +00:00
|
|
|
|
new FillFlowContainer
|
2017-02-18 05:16:46 +00:00
|
|
|
|
{
|
|
|
|
|
AutoSizeAxes = Axes.Both,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
2017-03-04 10:00:17 +00:00
|
|
|
|
Direction = FillDirection.Vertical,
|
2017-03-01 18:33:01 +00:00
|
|
|
|
Spacing = new Vector2(0, 2),
|
2017-02-18 05:16:46 +00:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2017-08-03 05:36:21 +00:00
|
|
|
|
icon = new SpriteIcon
|
2017-02-18 05:16:46 +00:00
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
Icon = FontAwesome.fa_warning,
|
2017-08-03 05:36:21 +00:00
|
|
|
|
Size = new Vector2(30),
|
2017-02-18 05:16:46 +00:00
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
TextSize = 30,
|
|
|
|
|
Text = "This is a development build",
|
|
|
|
|
Margin = new MarginPadding
|
|
|
|
|
{
|
|
|
|
|
Bottom = 20
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
Text = "Don't expect shit to work perfectly as this is very much a work in progress."
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
Text = "Don't report bugs because we are aware. Don't complain about missing features because we are adding them."
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
Text = "Sit back and enjoy. Visit discord.gg/ppy if you want to help out!",
|
|
|
|
|
Margin = new MarginPadding { Bottom = 20 },
|
|
|
|
|
},
|
|
|
|
|
new OsuSpriteText
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.TopCentre,
|
|
|
|
|
Origin = Anchor.TopCentre,
|
|
|
|
|
TextSize = 12,
|
|
|
|
|
Text = "oh and yes, you will get seizures.",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2017-02-17 11:07:11 +00:00
|
|
|
|
[BackgroundDependencyLoader]
|
2017-04-02 06:56:12 +00:00
|
|
|
|
private void load(OsuColour colours)
|
2017-02-17 11:07:11 +00:00
|
|
|
|
{
|
2017-04-02 06:56:12 +00:00
|
|
|
|
LoadComponentAsync(intro = new Intro());
|
2017-02-18 05:16:46 +00:00
|
|
|
|
|
|
|
|
|
iconColour = colours.Yellow;
|
2017-02-17 11:07:11 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnEntering(Screen last)
|
|
|
|
|
{
|
|
|
|
|
base.OnEntering(last);
|
|
|
|
|
|
2017-07-17 13:51:21 +00:00
|
|
|
|
icon.Delay(1500).FadeColour(iconColour, 200);
|
2017-02-18 05:16:46 +00:00
|
|
|
|
|
2017-07-17 13:51:21 +00:00
|
|
|
|
Content
|
|
|
|
|
.FadeInFromZero(500)
|
|
|
|
|
.Then(5500)
|
|
|
|
|
.FadeOut(250)
|
|
|
|
|
.Finally(d => Push(intro));
|
2017-02-17 11:07:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|