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-11-01 11:54:58 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-02-17 11:07:11 +00:00
|
|
|
|
using osu.Game.Screens.Menu;
|
2017-11-01 11:54:58 +00:00
|
|
|
|
using OpenTK;
|
2017-11-09 14:24:14 +00:00
|
|
|
|
using osu.Framework.Screens;
|
2017-02-17 11:07:11 +00:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Screens
|
|
|
|
|
{
|
2017-11-08 04:52:44 +00:00
|
|
|
|
public class Loader : OsuScreen
|
2017-02-17 11:07:11 +00:00
|
|
|
|
{
|
2017-11-09 14:24:14 +00:00
|
|
|
|
private bool showDisclaimer;
|
|
|
|
|
|
2017-11-01 07:57:59 +00:00
|
|
|
|
public override bool ShowOverlays => false;
|
2017-02-17 11:07:11 +00:00
|
|
|
|
|
|
|
|
|
public Loader()
|
|
|
|
|
{
|
|
|
|
|
ValidForResume = false;
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-09 08:38:20 +00:00
|
|
|
|
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
2017-11-01 11:54:58 +00:00
|
|
|
|
{
|
2017-11-09 08:38:20 +00:00
|
|
|
|
base.LogoArriving(logo, resuming);
|
2017-11-01 11:54:58 +00:00
|
|
|
|
|
|
|
|
|
logo.Triangles = false;
|
2017-11-09 14:24:14 +00:00
|
|
|
|
logo.Origin = Anchor.BottomRight;
|
|
|
|
|
logo.Anchor = Anchor.BottomRight;
|
|
|
|
|
logo.Position = new Vector2(-40);
|
2017-11-01 11:54:58 +00:00
|
|
|
|
logo.Scale = new Vector2(0.2f);
|
|
|
|
|
|
|
|
|
|
logo.FadeInFromZero(5000, Easing.OutQuint);
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-09 14:24:14 +00:00
|
|
|
|
protected override void OnEntering(Screen last)
|
2017-02-17 11:07:11 +00:00
|
|
|
|
{
|
2017-11-09 14:24:14 +00:00
|
|
|
|
base.OnEntering(last);
|
|
|
|
|
|
|
|
|
|
if (showDisclaimer)
|
2017-06-26 10:06:08 +00:00
|
|
|
|
LoadComponentAsync(new Disclaimer(), d => Push(d));
|
2017-02-17 11:07:11 +00:00
|
|
|
|
else
|
2017-06-26 10:06:08 +00:00
|
|
|
|
LoadComponentAsync(new Intro(), d => Push(d));
|
2017-02-17 11:07:11 +00:00
|
|
|
|
}
|
2017-11-09 14:24:14 +00:00
|
|
|
|
|
|
|
|
|
protected override void LogoSuspending(OsuLogo logo)
|
|
|
|
|
{
|
|
|
|
|
base.LogoSuspending(logo);
|
2017-11-13 09:43:05 +00:00
|
|
|
|
logo.FadeOut(100);
|
2017-11-09 14:24:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(OsuGameBase game)
|
|
|
|
|
{
|
|
|
|
|
showDisclaimer = game.IsDeployedBuild;
|
|
|
|
|
}
|
2017-02-17 11:07:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|