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