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

Rename shouldRotateCursor() to shouldKeepRotating()

This commit is contained in:
Power Maker 2020-06-12 15:43:19 +02:00
parent b076cf96b7
commit 8924ff4ba6

View File

@ -83,7 +83,7 @@ namespace osu.Game.Graphics.Cursor
activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
}
if (shouldRotateCursor(e))
if (shouldKeepRotating(e))
{
// if cursor is already rotating don't reset its rotate origin
if (dragRotationState != DragRotationState.Rotating)
@ -104,7 +104,7 @@ namespace osu.Game.Graphics.Cursor
activeCursor.ScaleTo(1, 500, Easing.OutElastic);
}
if (!shouldRotateCursor(e))
if (!shouldKeepRotating(e))
{
if (dragRotationState == DragRotationState.Rotating)
activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf);
@ -126,7 +126,7 @@ namespace osu.Game.Graphics.Cursor
activeCursor.ScaleTo(0.6f, 250, Easing.In);
}
private bool shouldRotateCursor(MouseEvent e) => cursorRotate.Value && (e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right));
private bool shouldKeepRotating(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);