1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 14:17:26 +08:00

Improve information flow to Disclaimer

This commit is contained in:
Dean Herbert 2019-07-09 18:06:49 +09:00
parent 0580c32263
commit e835cd0f6f
2 changed files with 16 additions and 5 deletions

View File

@ -45,7 +45,15 @@ namespace osu.Game.Screens
private OsuScreen loadableScreen;
private ShaderPrecompiler precompiler;
protected virtual OsuScreen CreateLoadableScreen() => showDisclaimer ? (OsuScreen)new Disclaimer() : new Intro();
protected virtual OsuScreen CreateLoadableScreen()
{
if (showDisclaimer)
return new Disclaimer(getIntroSequence());
return getIntroSequence();
}
private IntroScreen getIntroSequence() => new IntroCircles();
protected virtual ShaderPrecompiler CreateShaderPrecompiler() => new ShaderPrecompiler();

View File

@ -21,7 +21,6 @@ namespace osu.Game.Screens.Menu
{
public class Disclaimer : StartupScreen
{
private Intro intro;
private SpriteIcon icon;
private Color4 iconColour;
private LinkFlowContainer textFlow;
@ -32,10 +31,13 @@ namespace osu.Game.Screens.Menu
private const float icon_y = -85;
private const float icon_size = 30;
private readonly OsuScreen nextScreen;
private readonly Bindable<User> currentUser = new Bindable<User>();
public Disclaimer()
public Disclaimer(OsuScreen nextScreen = null)
{
this.nextScreen = nextScreen;
ValidForResume = false;
}
@ -146,7 +148,8 @@ namespace osu.Game.Screens.Menu
protected override void LoadComplete()
{
base.LoadComplete();
LoadComponentAsync(intro = new Intro());
if (nextScreen != null)
LoadComponentAsync(nextScreen);
}
public override void OnEntering(IScreen last)
@ -170,7 +173,7 @@ namespace osu.Game.Screens.Menu
.Then(5500)
.FadeOut(250)
.ScaleTo(0.9f, 250, Easing.InQuint)
.Finally(d => this.Push(intro));
.Finally(d => this.Push(nextScreen));
}
}
}