From a2fdf9448394f451c2243e0e7c6ebd2ba72db94e Mon Sep 17 00:00:00 2001 From: Power Maker <42269909+power9maker@users.noreply.github.com> Date: Tue, 2 Jun 2020 20:55:21 +0200 Subject: [PATCH 01/14] Add cursor rotation on right mouse button --- osu.Game/Graphics/Cursor/MenuCursor.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 580177d17a..740c809afc 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -83,10 +83,13 @@ namespace osu.Game.Graphics.Cursor activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint); } - if (e.Button == MouseButton.Left && cursorRotate.Value) + if ((e.Button == MouseButton.Left || e.Button == MouseButton.Right) && cursorRotate.Value) { - dragRotationState = DragRotationState.DragStarted; - positionMouseDown = e.MousePosition; + if(!(dragRotationState == DragRotationState.Rotating)) + { + positionMouseDown = e.MousePosition; + dragRotationState = DragRotationState.DragStarted; + } } return base.OnMouseDown(e); @@ -94,13 +97,13 @@ namespace osu.Game.Graphics.Cursor protected override void OnMouseUp(MouseUpEvent e) { - if (!e.IsPressed(MouseButton.Left) && !e.IsPressed(MouseButton.Right)) + if (!e.IsPressed(MouseButton.Left) && !e.IsPressed(MouseButton.Middle) && !e.IsPressed(MouseButton.Right)) { activeCursor.AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint); activeCursor.ScaleTo(1, 500, Easing.OutElastic); } - if (e.Button == MouseButton.Left) + if (!e.IsPressed(MouseButton.Left) && !e.IsPressed(MouseButton.Right)) { if (dragRotationState == DragRotationState.Rotating) activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf); From 85d0c04e61222d9734297f9365bb22fcfec6514a Mon Sep 17 00:00:00 2001 From: Power Maker <42269909+power9maker@users.noreply.github.com> Date: Tue, 2 Jun 2020 20:57:02 +0200 Subject: [PATCH 02/14] Add cursor rotation on right mouse button --- osu.Game/Graphics/Cursor/MenuCursor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 740c809afc..c92304b2d2 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -87,8 +87,8 @@ namespace osu.Game.Graphics.Cursor { if(!(dragRotationState == DragRotationState.Rotating)) { - positionMouseDown = e.MousePosition; dragRotationState = DragRotationState.DragStarted; + positionMouseDown = e.MousePosition; } } From fa4d13a22b68440e885288f57157cfb2d3466007 Mon Sep 17 00:00:00 2001 From: Power Maker Date: Tue, 2 Jun 2020 22:25:25 +0200 Subject: [PATCH 03/14] Fixed whitespace --- osu.Game/Graphics/Cursor/MenuCursor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index c92304b2d2..1aa7b68d1a 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -85,7 +85,7 @@ namespace osu.Game.Graphics.Cursor if ((e.Button == MouseButton.Left || e.Button == MouseButton.Right) && cursorRotate.Value) { - if(!(dragRotationState == DragRotationState.Rotating)) + if (!(dragRotationState == DragRotationState.Rotating)) { dragRotationState = DragRotationState.DragStarted; positionMouseDown = e.MousePosition; From 86a4664d9ba73522ae51320686f0f60082521a2e Mon Sep 17 00:00:00 2001 From: Power Maker Date: Wed, 3 Jun 2020 10:03:39 +0200 Subject: [PATCH 04/14] Add method for checking if cursor should rotate --- osu.Game/Graphics/Cursor/MenuCursor.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 1aa7b68d1a..e0b39ac311 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -83,8 +83,9 @@ namespace osu.Game.Graphics.Cursor activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint); } - if ((e.Button == MouseButton.Left || e.Button == MouseButton.Right) && cursorRotate.Value) + if (shouldRotate(e) && cursorRotate.Value) { + // if cursor is already rotating don't reset its rotate origin if (!(dragRotationState == DragRotationState.Rotating)) { dragRotationState = DragRotationState.DragStarted; @@ -97,13 +98,14 @@ namespace osu.Game.Graphics.Cursor protected override void OnMouseUp(MouseUpEvent e) { - if (!e.IsPressed(MouseButton.Left) && !e.IsPressed(MouseButton.Middle) && !e.IsPressed(MouseButton.Right)) + // cursor should go back to original size when none of main buttons are pressed + if (!(e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right))) { activeCursor.AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint); activeCursor.ScaleTo(1, 500, Easing.OutElastic); } - if (!e.IsPressed(MouseButton.Left) && !e.IsPressed(MouseButton.Right)) + if (!shouldRotate(e)) { if (dragRotationState == DragRotationState.Rotating) activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf); @@ -125,6 +127,14 @@ namespace osu.Game.Graphics.Cursor activeCursor.ScaleTo(0.6f, 250, Easing.In); } + private static bool shouldRotate(MouseEvent e) + { + if (e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right)) + return true; + else + return false; + } + public class Cursor : Container { private Container cursorContainer; From 89d973416a1f9807b0d44bdb519c1c846ae5816d Mon Sep 17 00:00:00 2001 From: Power Maker <42269909+power9maker@users.noreply.github.com> Date: Wed, 3 Jun 2020 20:35:44 +0200 Subject: [PATCH 05/14] Simplify shouldRotate method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bartłomiej Dach --- osu.Game/Graphics/Cursor/MenuCursor.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index e0b39ac311..40735d6de0 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -127,13 +127,7 @@ namespace osu.Game.Graphics.Cursor activeCursor.ScaleTo(0.6f, 250, Easing.In); } - private static bool shouldRotate(MouseEvent e) - { - if (e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right)) - return true; - else - return false; - } + private static bool shouldRotate(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right); public class Cursor : Container { From 3fa02a5782e95b0b92362ac83ad15ae6e1ae5caa Mon Sep 17 00:00:00 2001 From: Power Maker Date: Wed, 3 Jun 2020 20:43:47 +0200 Subject: [PATCH 06/14] Add method for any mouse button pressed. --- osu.Game/Graphics/Cursor/MenuCursor.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 40735d6de0..ad413f187a 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -15,6 +15,7 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input.Events; using osuTK.Input; using osu.Framework.Utils; +using osu.Game.Screens.Multi.Components; namespace osu.Game.Graphics.Cursor { @@ -83,7 +84,7 @@ namespace osu.Game.Graphics.Cursor activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint); } - if (shouldRotate(e) && cursorRotate.Value) + if (shouldRotateCursor(e) && cursorRotate.Value) { // if cursor is already rotating don't reset its rotate origin if (!(dragRotationState == DragRotationState.Rotating)) @@ -99,13 +100,13 @@ namespace osu.Game.Graphics.Cursor protected override void OnMouseUp(MouseUpEvent e) { // cursor should go back to original size when none of main buttons are pressed - if (!(e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right))) + if (!anyMouseButtonPressed(e)) { activeCursor.AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint); activeCursor.ScaleTo(1, 500, Easing.OutElastic); } - if (!shouldRotate(e)) + if (!shouldRotateCursor(e)) { if (dragRotationState == DragRotationState.Rotating) activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf); @@ -127,7 +128,9 @@ namespace osu.Game.Graphics.Cursor activeCursor.ScaleTo(0.6f, 250, Easing.In); } - private static bool shouldRotate(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right); + private static bool shouldRotateCursor(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right); + + private static bool anyMouseButtonPressed(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right); public class Cursor : Container { From eb15fc0bf9c4280de88ce215b98a4c8f4a36cdfa Mon Sep 17 00:00:00 2001 From: Power Maker Date: Wed, 3 Jun 2020 20:46:24 +0200 Subject: [PATCH 07/14] Remove unnecessary comment --- osu.Game/Graphics/Cursor/MenuCursor.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index ad413f187a..33715ad7f1 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -99,7 +99,6 @@ namespace osu.Game.Graphics.Cursor protected override void OnMouseUp(MouseUpEvent e) { - // cursor should go back to original size when none of main buttons are pressed if (!anyMouseButtonPressed(e)) { activeCursor.AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint); From 747ecd5ab23aaf5d625e6daee39d7cda2c6d826b Mon Sep 17 00:00:00 2001 From: Power Maker Date: Wed, 3 Jun 2020 20:50:37 +0200 Subject: [PATCH 08/14] Rename method to avoid confusion --- osu.Game/Graphics/Cursor/MenuCursor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 33715ad7f1..df3eabe7c6 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -99,7 +99,7 @@ namespace osu.Game.Graphics.Cursor protected override void OnMouseUp(MouseUpEvent e) { - if (!anyMouseButtonPressed(e)) + if (!anyMainButtonPressed(e)) { activeCursor.AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint); activeCursor.ScaleTo(1, 500, Easing.OutElastic); @@ -129,7 +129,7 @@ namespace osu.Game.Graphics.Cursor private static bool shouldRotateCursor(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right); - private static bool anyMouseButtonPressed(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); public class Cursor : Container { From ff220b2ebeece677fe1836fd0124f9a9939407de Mon Sep 17 00:00:00 2001 From: Power Maker Date: Wed, 3 Jun 2020 21:13:11 +0200 Subject: [PATCH 09/14] Remove unnecessary using statement. --- osu.Game/Graphics/Cursor/MenuCursor.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index df3eabe7c6..f4a16c7727 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -15,7 +15,6 @@ using osu.Framework.Graphics.Textures; using osu.Framework.Input.Events; using osuTK.Input; using osu.Framework.Utils; -using osu.Game.Screens.Multi.Components; namespace osu.Game.Graphics.Cursor { From 939a76b08f32af92c6d425d7ff8003ad736d3126 Mon Sep 17 00:00:00 2001 From: Power Maker Date: Wed, 3 Jun 2020 21:42:23 +0200 Subject: [PATCH 10/14] Simplify negative equality expression --- osu.Game/Graphics/Cursor/MenuCursor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index f4a16c7727..507d218fb8 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -86,7 +86,7 @@ namespace osu.Game.Graphics.Cursor if (shouldRotateCursor(e) && cursorRotate.Value) { // if cursor is already rotating don't reset its rotate origin - if (!(dragRotationState == DragRotationState.Rotating)) + if (dragRotationState != DragRotationState.Rotating) { dragRotationState = DragRotationState.DragStarted; positionMouseDown = e.MousePosition; From b076cf96b71b07bdd4929f2a92eaa7f303d66a98 Mon Sep 17 00:00:00 2001 From: Power Maker Date: Fri, 12 Jun 2020 13:20:09 +0200 Subject: [PATCH 11/14] move cursorRotate.Value check into shouldRotateCursor() method --- osu.Game/Graphics/Cursor/MenuCursor.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 507d218fb8..b89ad6a356 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -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); From 8924ff4ba6585e883b8da322d8d3b1662b1fcc76 Mon Sep 17 00:00:00 2001 From: Power Maker Date: Fri, 12 Jun 2020 15:43:19 +0200 Subject: [PATCH 12/14] Rename shouldRotateCursor() to shouldKeepRotating() --- osu.Game/Graphics/Cursor/MenuCursor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index b89ad6a356..8305f33e25 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -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); From 9230c148c7f68ea6908568d72052ca7e165678e2 Mon Sep 17 00:00:00 2001 From: Power Maker Date: Sat, 13 Jun 2020 12:18:50 +0200 Subject: [PATCH 13/14] Add cursor rotation on middle mouse button --- osu.Game/Graphics/Cursor/MenuCursor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index 8305f33e25..ff28dddd40 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -126,7 +126,7 @@ namespace osu.Game.Graphics.Cursor activeCursor.ScaleTo(0.6f, 250, Easing.In); } - private bool shouldKeepRotating(MouseEvent e) => cursorRotate.Value && (e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Right)); + private bool shouldKeepRotating(MouseEvent e) => cursorRotate.Value && (anyMainButtonPressed(e)); private static bool anyMainButtonPressed(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right); From e91c2ee5e275bcdc398bcc117055a468ea2f8348 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 22 Jun 2020 16:19:38 +0900 Subject: [PATCH 14/14] Simplify logic by considering all buttons equally --- osu.Game/Graphics/Cursor/MenuCursor.cs | 36 +++++++++----------------- 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/osu.Game/Graphics/Cursor/MenuCursor.cs b/osu.Game/Graphics/Cursor/MenuCursor.cs index ff28dddd40..fd8f016860 100644 --- a/osu.Game/Graphics/Cursor/MenuCursor.cs +++ b/osu.Game/Graphics/Cursor/MenuCursor.cs @@ -13,7 +13,6 @@ using JetBrains.Annotations; using osu.Framework.Bindables; using osu.Framework.Graphics.Textures; using osu.Framework.Input.Events; -using osuTK.Input; using osu.Framework.Utils; namespace osu.Game.Graphics.Cursor @@ -74,23 +73,17 @@ namespace osu.Game.Graphics.Cursor protected override bool OnMouseDown(MouseDownEvent e) { // only trigger animation for main mouse buttons - if (e.Button <= MouseButton.Right) - { - activeCursor.Scale = new Vector2(1); - activeCursor.ScaleTo(0.90f, 800, Easing.OutQuint); + activeCursor.Scale = new Vector2(1); + activeCursor.ScaleTo(0.90f, 800, Easing.OutQuint); - activeCursor.AdditiveLayer.Alpha = 0; - activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint); - } + activeCursor.AdditiveLayer.Alpha = 0; + activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint); - if (shouldKeepRotating(e)) + if (cursorRotate.Value && dragRotationState != DragRotationState.Rotating) { // if cursor is already rotating don't reset its rotate origin - if (dragRotationState != DragRotationState.Rotating) - { - dragRotationState = DragRotationState.DragStarted; - positionMouseDown = e.MousePosition; - } + dragRotationState = DragRotationState.DragStarted; + positionMouseDown = e.MousePosition; } return base.OnMouseDown(e); @@ -98,17 +91,16 @@ namespace osu.Game.Graphics.Cursor protected override void OnMouseUp(MouseUpEvent e) { - if (!anyMainButtonPressed(e)) + if (!e.HasAnyButtonPressed) { activeCursor.AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint); activeCursor.ScaleTo(1, 500, Easing.OutElastic); - } - if (!shouldKeepRotating(e)) - { - if (dragRotationState == DragRotationState.Rotating) + if (dragRotationState != DragRotationState.NotDragging) + { activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf); - dragRotationState = DragRotationState.NotDragging; + dragRotationState = DragRotationState.NotDragging; + } } base.OnMouseUp(e); @@ -126,10 +118,6 @@ namespace osu.Game.Graphics.Cursor activeCursor.ScaleTo(0.6f, 250, Easing.In); } - private bool shouldKeepRotating(MouseEvent e) => cursorRotate.Value && (anyMainButtonPressed(e)); - - private static bool anyMainButtonPressed(MouseEvent e) => e.IsPressed(MouseButton.Left) || e.IsPressed(MouseButton.Middle) || e.IsPressed(MouseButton.Right); - public class Cursor : Container { private Container cursorContainer;