Stop blocking player loader when hovering over osu! logo

This commit is contained in:
Salman Ahmed 2024-02-02 01:02:13 +03:00
parent 5a1b0004db
commit 0502997ae9

View File

@ -106,8 +106,8 @@ namespace osu.Game.Screens.Play
&& ReadyForGameplay;
protected virtual bool ReadyForGameplay =>
// not ready if the user is hovering one of the panes, unless they are idle.
(IsHovered || idleTracker.IsIdle.Value)
// not ready if the user is hovering one of the panes (logo is excluded), unless they are idle.
(IsHovered || osuLogo?.IsHovered == true || idleTracker.IsIdle.Value)
// not ready if the user is dragging a slider or otherwise.
&& inputManager.DraggedDrawable == null
// not ready if a focused overlay is visible, like settings.
@ -306,10 +306,14 @@ namespace osu.Game.Screens.Play
return base.OnExiting(e);
}
private OsuLogo? osuLogo;
protected override void LogoArriving(OsuLogo logo, bool resuming)
{
base.LogoArriving(logo, resuming);
osuLogo = logo;
const double duration = 300;
if (!resuming) logo.MoveTo(new Vector2(0.5f), duration, Easing.OutQuint);
@ -328,6 +332,7 @@ namespace osu.Game.Screens.Play
{
base.LogoExiting(logo);
content.StopTracking();
osuLogo = null;
}
protected override void LogoSuspending(OsuLogo logo)
@ -338,6 +343,8 @@ namespace osu.Game.Screens.Play
logo
.FadeOut(CONTENT_OUT_DURATION / 2, Easing.OutQuint)
.ScaleTo(logo.Scale * 0.8f, CONTENT_OUT_DURATION * 2, Easing.OutQuint);
osuLogo = null;
}
#endregion