diff --git a/osu.Game/Configuration/SessionStatics.cs b/osu.Game/Configuration/SessionStatics.cs index 9afb1bda36..0c1ea1e568 100644 --- a/osu.Game/Configuration/SessionStatics.cs +++ b/osu.Game/Configuration/SessionStatics.cs @@ -17,5 +17,6 @@ protected override void PerformLoad() public enum Statics { + LoginOverlayDisplayed, } } diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index dd81569e26..1834221d35 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -52,6 +52,9 @@ public class MainMenu : OsuScreen [Resolved(canBeNull: true)] private LoginOverlay login { get; set; } + [Resolved] + private SessionStatics statics { get; set; } + [Resolved] private IAPIProvider api { get; set; } @@ -170,7 +173,6 @@ public override void OnEntering(IScreen last) Beatmap.ValueChanged += beatmap_ValueChanged; } - private bool loginDisplayed; private bool exitConfirmed; protected override void LogoArriving(OsuLogo logo, bool resuming) @@ -198,10 +200,12 @@ protected override void LogoArriving(OsuLogo logo, bool resuming) bool displayLogin() { - if (!loginDisplayed) + var loginDisplayed = statics.GetBindable(Statics.LoginOverlayDisplayed); + + if (!loginDisplayed.Value) { Scheduler.AddDelayed(() => login?.Show(), 500); - loginDisplayed = true; + loginDisplayed.Value = true; } return true;