1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:12:54 +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;
}
private bool loginDisplayed = false;
protected override void LogoArriving(OsuLogo logo, bool resuming)
{
base.LogoArriving(logo, resuming);
@ -160,11 +162,18 @@ namespace osu.Game.Screens.Menu
}
else if (!api.IsLoggedIn)
{
logo.Action += () =>
logo.Action += displayLogin;
}
bool displayLogin()
{
if (!loginDisplayed)
{
Scheduler.AddDelayed(() => login?.Show(), 500);
return true;
};
loginDisplayed = true;
}
return true;
}
}