1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 07:42:55 +08:00

Merge pull request #16116 from peppy/dont-animate-menu-cursor-when-not-active

Avoid applying mouse down effects to menu cursor when it isn't visible
This commit is contained in:
Dan Balasescu 2021-12-16 21:05:28 +09:00 committed by GitHub
commit 44485b4a86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,6 +71,8 @@ namespace osu.Game.Graphics.Cursor
}
protected override bool OnMouseDown(MouseDownEvent e)
{
if (State.Value == Visibility.Visible)
{
// only trigger animation for main mouse buttons
activeCursor.Scale = new Vector2(1);
@ -85,6 +87,7 @@ namespace osu.Game.Graphics.Cursor
dragRotationState = DragRotationState.DragStarted;
positionMouseDown = e.MousePosition;
}
}
return base.OnMouseDown(e);
}