1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-04 02:13:39 +08:00

move cursorRotate.Value check into shouldRotateCursor() method

This commit is contained in:
Power Maker
2020-06-12 13:20:09 +02:00
Unverified
parent 939a76b08f
commit b076cf96b7
+2 -2
View File
@@ -83,7 +83,7 @@ namespace osu.Game.Graphics.Cursor
activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
}
if (shouldRotateCursor(e) && cursorRotate.Value)
if (shouldRotateCursor(e))
{
// if cursor is already rotating don't reset its rotate origin
if (dragRotationState != DragRotationState.Rotating)
@@ -126,7 +126,7 @@ namespace osu.Game.Graphics.Cursor
activeCursor.ScaleTo(0.6f, 250, Easing.In);
}
private static bool shouldRotateCursor(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right);
private bool shouldRotateCursor(MouseEvent e) => cursorRotate.Value && (e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right));
private static bool anyMainButtonPressed(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right);