mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
CursorOverrideContainer.ShowMenuCursor
This commit is contained in:
@ -21,6 +21,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
/// Whether any cursors can be displayed.
|
||||
/// </summary>
|
||||
public bool CanShowCursor = true;
|
||||
public bool ShowMenuCursor = true;
|
||||
|
||||
public CursorContainer Cursor { get; }
|
||||
public bool ProvidingUserCursor => true;
|
||||
@ -53,6 +54,14 @@ namespace osu.Game.Graphics.Cursor
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentTarget?.Cursor is MenuCursor)
|
||||
{
|
||||
if (ShowMenuCursor && currentTarget?.Cursor.State == Visibility.Hidden)
|
||||
currentTarget?.Cursor?.Show();
|
||||
else if (!ShowMenuCursor && currentTarget?.Cursor.State == Visibility.Visible)
|
||||
currentTarget?.Cursor?.Hide();
|
||||
}
|
||||
|
||||
var newTarget = inputManager.HoveredDrawables.OfType<IProvideCursor>().FirstOrDefault(t => t.ProvidingUserCursor) ?? this;
|
||||
|
||||
if (currentTarget == newTarget)
|
||||
|
Reference in New Issue
Block a user