mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 16:43:52 +09: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:
@ -71,6 +71,8 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
protected override bool OnMouseDown(MouseDownEvent e)
|
||||||
|
{
|
||||||
|
if (State.Value == Visibility.Visible)
|
||||||
{
|
{
|
||||||
// only trigger animation for main mouse buttons
|
// only trigger animation for main mouse buttons
|
||||||
activeCursor.Scale = new Vector2(1);
|
activeCursor.Scale = new Vector2(1);
|
||||||
@ -85,6 +87,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
dragRotationState = DragRotationState.DragStarted;
|
dragRotationState = DragRotationState.DragStarted;
|
||||||
positionMouseDown = e.MousePosition;
|
positionMouseDown = e.MousePosition;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return base.OnMouseDown(e);
|
return base.OnMouseDown(e);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user