Fix cursor being displayed on intro/disclaimer

This commit is contained in:
smoogipoo
2018-01-12 19:34:55 +09:00
parent 5952f1e7f1
commit 620e125fad
6 changed files with 28 additions and 16 deletions

View File

@ -14,6 +14,11 @@ namespace osu.Game.Graphics.Cursor
protected override Container<Drawable> Content => content;
private readonly Container content;
/// <summary>
/// Whether any cursors can be displayed.
/// </summary>
public bool CanShowCursor;
public CursorContainer LocalCursor { get; }
public bool ProvidesUserCursor => true;
@ -39,6 +44,12 @@ namespace osu.Game.Graphics.Cursor
{
base.Update();
if (!CanShowCursor)
{
currentTarget?.LocalCursor?.Hide();
return;
}
var newTarget = inputManager.HoveredDrawables.OfType<IProvideLocalCursor>().FirstOrDefault(t => t.ProvidesUserCursor) ?? this;
if (currentTarget == newTarget)