1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 04:02:57 +08:00

Remove unnecessary bool storage

Also delay show slightly for better user experience.
This commit is contained in:
Dean Herbert 2019-09-10 01:12:30 +09:00
parent 0ec642d826
commit f398f134e1

View File

@ -39,8 +39,6 @@ namespace osu.Game.Screens.Menu
private ButtonSystem buttons;
private bool loginPrompted;
[Resolved]
private GameHost host { get; set; }
@ -151,16 +149,6 @@ namespace osu.Game.Screens.Menu
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
logo.FadeIn(100, Easing.OutQuint);
logo.Action += () =>
{
if (!api.IsLoggedIn && !loginPrompted)
login?.Show();
loginPrompted = true;
return true;
};
if (resuming)
{
buttons.State = ButtonSystemState.TopLevel;
@ -170,6 +158,14 @@ namespace osu.Game.Screens.Menu
sideFlashes.Delay(FADE_IN_DURATION).FadeIn(64, Easing.InQuint);
}
else if (!api.IsLoggedIn)
{
logo.Action += () =>
{
Scheduler.AddDelayed(() => login?.Show(), 500);
return true;
};
}
}
protected override void LogoSuspending(OsuLogo logo)