mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 03:43:21 +08:00
move cursorRotate.Value check into shouldRotateCursor() method
This commit is contained in:
parent
939a76b08f
commit
b076cf96b7
@ -83,7 +83,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
|
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 cursor is already rotating don't reset its rotate origin
|
||||||
if (dragRotationState != DragRotationState.Rotating)
|
if (dragRotationState != DragRotationState.Rotating)
|
||||||
@ -126,7 +126,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
activeCursor.ScaleTo(0.6f, 250, Easing.In);
|
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);
|
private static bool anyMainButtonPressed(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user