mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
move logic to logo action
This commit is contained in:
@ -39,6 +39,8 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
private ButtonSystem buttons;
|
private ButtonSystem buttons;
|
||||||
|
|
||||||
|
private bool loginPrompted = false;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private GameHost host { get; set; }
|
private GameHost host { get; set; }
|
||||||
|
|
||||||
@ -137,9 +139,6 @@ namespace osu.Game.Screens.Menu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!api.IsLoggedIn)
|
|
||||||
login?.ToggleVisibility();
|
|
||||||
|
|
||||||
Beatmap.ValueChanged += beatmap_ValueChanged;
|
Beatmap.ValueChanged += beatmap_ValueChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,6 +151,16 @@ namespace osu.Game.Screens.Menu
|
|||||||
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
|
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
|
||||||
logo.FadeIn(100, Easing.OutQuint);
|
logo.FadeIn(100, Easing.OutQuint);
|
||||||
|
|
||||||
|
logo.Action += () =>
|
||||||
|
{
|
||||||
|
if (!api.IsLoggedIn && !loginPrompted)
|
||||||
|
login?.ToggleVisibility();
|
||||||
|
|
||||||
|
loginPrompted = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
if (resuming)
|
if (resuming)
|
||||||
{
|
{
|
||||||
buttons.State = ButtonSystemState.TopLevel;
|
buttons.State = ButtonSystemState.TopLevel;
|
||||||
|
Reference in New Issue
Block a user