1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 09:07:25 +08:00

Avoid applying mouse down effects to menu cursor when it isn't visible

Closes #16114.
This commit is contained in:
Dean Herbert 2021-12-16 20:20:02 +09:00
parent aa0813ff05
commit eecb1ce9f5

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);
}