mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Add sample usage to the session statics
This commit is contained in:
parent
e3e245ab20
commit
267e12ce3c
@ -17,5 +17,6 @@ namespace osu.Game.Configuration
|
||||
|
||||
public enum Statics
|
||||
{
|
||||
LoginOverlayDisplayed,
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,9 @@ namespace osu.Game.Screens.Menu
|
||||
[Resolved(canBeNull: true)]
|
||||
private LoginOverlay login { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private SessionStatics statics { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private IAPIProvider api { get; set; }
|
||||
|
||||
@ -170,7 +173,6 @@ namespace osu.Game.Screens.Menu
|
||||
Beatmap.ValueChanged += beatmap_ValueChanged;
|
||||
}
|
||||
|
||||
private bool loginDisplayed;
|
||||
private bool exitConfirmed;
|
||||
|
||||
protected override void LogoArriving(OsuLogo logo, bool resuming)
|
||||
@ -198,10 +200,12 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
bool displayLogin()
|
||||
{
|
||||
if (!loginDisplayed)
|
||||
var loginDisplayed = statics.GetBindable<bool>(Statics.LoginOverlayDisplayed);
|
||||
|
||||
if (!loginDisplayed.Value)
|
||||
{
|
||||
Scheduler.AddDelayed(() => login?.Show(), 500);
|
||||
loginDisplayed = true;
|
||||
loginDisplayed.Value = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user