mirror of https://github.com/ppy/osu
Allow PlayerLoader to proceed even if the mouse is hovering an overlay panel
This commit is contained in:
parent
655e96b2c1
commit
b902457f8d
|
@ -18,6 +18,7 @@
|
|||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Input;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
|
@ -53,6 +54,8 @@ public class PlayerLoader : ScreenWithBeatmapBackground
|
|||
|
||||
private InputManager inputManager;
|
||||
|
||||
private IdleTracker idleTracker;
|
||||
|
||||
public PlayerLoader(Func<Player> createPlayer)
|
||||
{
|
||||
this.createPlayer = createPlayer;
|
||||
|
@ -93,7 +96,8 @@ private void load()
|
|||
VisualSettings = new VisualSettings(),
|
||||
new InputSettings()
|
||||
}
|
||||
}
|
||||
},
|
||||
idleTracker = new IdleTracker(750)
|
||||
});
|
||||
|
||||
loadNewPlayer();
|
||||
|
@ -193,7 +197,7 @@ protected override void LoadComplete()
|
|||
// Here because IsHovered will not update unless we do so.
|
||||
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()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue