1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-08 01:27:46 +08:00
osu-lazer/osu.Game/Screens/Menu/Disclaimer.cs

120 lines
4.1 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using osu.Framework.Allocation;
2017-02-18 13:16:46 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Screens;
2017-02-18 13:16:46 +08:00
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using OpenTK;
using OpenTK.Graphics;
namespace osu.Game.Screens.Menu
{
class Disclaimer : OsuScreen
{
private Intro intro;
2017-02-18 13:16:46 +08:00
private TextAwesome icon;
private Color4 iconColour;
internal override bool ShowOverlays => false;
2017-02-18 13:16:46 +08:00
public Disclaimer()
{
ValidForResume = false;
Children = new Drawable[]
{
new FlowContainer
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Direction = FlowDirections.Vertical,
Spacing = new Vector2(0, 2),
Children = new Drawable[]
{
icon = new TextAwesome
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Icon = FontAwesome.fa_warning,
TextSize = 30,
},
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.",
},
}
}
};
}
[BackgroundDependencyLoader]
2017-02-18 13:16:46 +08:00
private void load(OsuGame game, OsuColour colours)
{
(intro = new Intro()).Preload(game);
2017-02-18 13:16:46 +08:00
iconColour = colours.Yellow;
}
protected override void OnEntering(Screen last)
{
base.OnEntering(last);
2017-02-18 13:16:46 +08:00
Content.FadeInFromZero(500);
icon.Delay(1500);
icon.FadeColour(iconColour, 200);
Delay(6000, true);
2017-02-18 13:16:46 +08:00
Content.FadeOut(250);
2017-02-18 13:16:46 +08:00
Delay(250);
2017-02-18 13:16:46 +08:00
Schedule(() => Push(intro));
}
}
}