1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 12:33:01 +08:00

Add back local bool (required due to action limitations)

This commit is contained in:
Dean Herbert 2019-09-10 01:17:58 +09:00
parent dce675d6a8
commit 7eb20da820

View File

@ -140,6 +140,8 @@ namespace osu.Game.Screens.Menu
Beatmap.ValueChanged += beatmap_ValueChanged; Beatmap.ValueChanged += beatmap_ValueChanged;
} }
private bool loginDisplayed = false;
protected override void LogoArriving(OsuLogo logo, bool resuming) protected override void LogoArriving(OsuLogo logo, bool resuming)
{ {
base.LogoArriving(logo, resuming); base.LogoArriving(logo, resuming);
@ -160,11 +162,18 @@ namespace osu.Game.Screens.Menu
} }
else if (!api.IsLoggedIn) else if (!api.IsLoggedIn)
{ {
logo.Action += () => logo.Action += displayLogin;
}
bool displayLogin()
{
if (!loginDisplayed)
{ {
Scheduler.AddDelayed(() => login?.Show(), 500); Scheduler.AddDelayed(() => login?.Show(), 500);
return true; loginDisplayed = true;
}; }
return true;
} }
} }