mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
Allow PlayerLoader to proceed even if the mouse is hovering an overlay panel
This commit is contained in:
@ -18,6 +18,7 @@ using osu.Game.Graphics;
|
|||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
using osu.Game.Input;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
@ -53,6 +54,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private InputManager inputManager;
|
private InputManager inputManager;
|
||||||
|
|
||||||
|
private IdleTracker idleTracker;
|
||||||
|
|
||||||
public PlayerLoader(Func<Player> createPlayer)
|
public PlayerLoader(Func<Player> createPlayer)
|
||||||
{
|
{
|
||||||
this.createPlayer = createPlayer;
|
this.createPlayer = createPlayer;
|
||||||
@ -93,7 +96,8 @@ namespace osu.Game.Screens.Play
|
|||||||
VisualSettings = new VisualSettings(),
|
VisualSettings = new VisualSettings(),
|
||||||
new InputSettings()
|
new InputSettings()
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
idleTracker = new IdleTracker(750)
|
||||||
});
|
});
|
||||||
|
|
||||||
loadNewPlayer();
|
loadNewPlayer();
|
||||||
@ -193,7 +197,7 @@ namespace osu.Game.Screens.Play
|
|||||||
// Here because IsHovered will not update unless we do so.
|
// Here because IsHovered will not update unless we do so.
|
||||||
public override bool HandlePositionalInput => true;
|
public override bool HandlePositionalInput => true;
|
||||||
|
|
||||||
private bool readyForPush => player.LoadState == LoadState.Ready && IsHovered && GetContainingInputManager()?.DraggedDrawable == null;
|
private bool readyForPush => player.LoadState == LoadState.Ready && (IsHovered || idleTracker.IsIdle.Value) && inputManager?.DraggedDrawable == null;
|
||||||
|
|
||||||
private void pushWhenLoaded()
|
private void pushWhenLoaded()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user