Convert everything to use IScreen

This commit is contained in:
smoogipoo
2019-01-23 20:52:00 +09:00
parent d86f2e04b4
commit 8ea7ec6445
47 changed files with 426 additions and 457 deletions

View File

@ -8,22 +8,22 @@ namespace osu.Game.Overlays.AccountCreation
{
public abstract class AccountCreationScreen : Screen
{
protected override void OnEntering(Screen last)
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
Content.FadeOut().Delay(200).FadeIn(200);
this.FadeOut().Delay(200).FadeIn(200);
}
protected override void OnResuming(Screen last)
public override void OnResuming(IScreen last)
{
base.OnResuming(last);
Content.FadeIn(200);
this.FadeIn(200);
}
protected override void OnSuspending(Screen next)
public override void OnSuspending(IScreen next)
{
base.OnSuspending(next);
Content.FadeOut(200);
this.FadeOut(200);
}
}
}

View File

@ -44,7 +44,7 @@ namespace osu.Game.Overlays.AccountCreation
{
this.api = api;
Children = new Drawable[]
InternalChildren = new Drawable[]
{
new FillFlowContainer
{
@ -143,7 +143,7 @@ namespace osu.Game.Overlays.AccountCreation
focusNextTextbox();
}
protected override void OnEntering(Screen last)
public override void OnEntering(IScreen last)
{
base.OnEntering(last);
processingOverlay.Hide();

View File

@ -26,12 +26,12 @@ namespace osu.Game.Overlays.AccountCreation
private const string help_centre_url = "/help/wiki/Help_Centre#login";
protected override void OnEntering(Screen last)
public override void OnEntering(IScreen last)
{
if (string.IsNullOrEmpty(api.ProvidedUsername))
{
Content.FadeOut();
Push(new ScreenEntry());
this.FadeOut();
this.Push(new ScreenEntry());
return;
}
@ -46,7 +46,7 @@ namespace osu.Game.Overlays.AccountCreation
if (string.IsNullOrEmpty(api.ProvidedUsername))
return;
Children = new Drawable[]
InternalChildren = new Drawable[]
{
new Sprite
{
@ -104,7 +104,7 @@ namespace osu.Game.Overlays.AccountCreation
new DangerousSettingsButton
{
Text = "I understand. This account isn't for me.",
Action = () => Push(new ScreenEntry())
Action = () => this.Push(new ScreenEntry())
},
furtherAssistance = new LinkFlowContainer(cp => { cp.TextSize = 12; })
{

View File

@ -4,6 +4,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Screens;
using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Settings;
using osu.Game.Screens.Menu;
@ -16,7 +17,7 @@ namespace osu.Game.Overlays.AccountCreation
[BackgroundDependencyLoader]
private void load()
{
Child = new FillFlowContainer
InternalChild = new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
@ -56,7 +57,7 @@ namespace osu.Game.Overlays.AccountCreation
{
Text = "Let's create an account!",
Margin = new MarginPadding { Vertical = 120 },
Action = () => Push(new ScreenWarning())
Action = () => this.Push(new ScreenWarning())
}
}
};

View File

@ -6,6 +6,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Screens;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Online.API;
@ -82,7 +83,7 @@ namespace osu.Game.Overlays
base.PopIn();
this.FadeIn(transition_time, Easing.OutQuint);
if (welcomeScreen.ChildScreen != null)
if (welcomeScreen.GetChildScreen() != null)
welcomeScreen.MakeCurrent();
}