Don't show warning screen if no previous account is detected

This commit is contained in:
Dean Herbert 2018-12-06 16:54:08 +09:00
parent de8c5a6df0
commit b0e2b56e85

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Screens;
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;
@ -21,12 +22,26 @@ namespace osu.Game.Overlays.AccountCreation
{ {
private OsuTextFlowContainer multiAccountExplanationText; private OsuTextFlowContainer multiAccountExplanationText;
private LinkFlowContainer furtherAssistance; private LinkFlowContainer furtherAssistance;
private APIAccess api;
private const string help_centre_url = "/help/wiki/Help_Centre#login"; private const string help_centre_url = "/help/wiki/Help_Centre#login";
protected override void OnEntering(Screen last)
{
if (string.IsNullOrEmpty(api.ProvidedUsername))
{
Content.FadeOut();
Push(new ScreenEntry());
return;
}
base.OnEntering(last);
}
[BackgroundDependencyLoader(true)] [BackgroundDependencyLoader(true)]
private void load(OsuColour colours, APIAccess api, OsuGame game, TextureStore textures) private void load(OsuColour colours, APIAccess api, OsuGame game, TextureStore textures)
{ {
this.api = api;
Children = new Drawable[] Children = new Drawable[]
{ {
new Sprite new Sprite