Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double sized yellow cursor #26477

Closed
nana123126 opened this issue Jan 11, 2024 · 10 comments · Fixed by #26545
Closed

Double sized yellow cursor #26477

nana123126 opened this issue Jan 11, 2024 · 10 comments · Fixed by #26545

Comments

@nana123126
Copy link

nana123126 commented Jan 11, 2024

Type

Game behaviour

Bug description

At the moment of canceling the pause, the size of the yellow cursor is larger than usual, about twice the size, and clicking on this double sized yellow cursor can still continue the game.

Screenshots or videos

image

2024-01-11.19-21-18_Sav1.mp4

Version

2023.1231.0

Logs

log

@bdach
Copy link
Collaborator

bdach commented Jan 11, 2024

I don't understand what this is trying to say.

It appears that you were trying to upload a video of this but failed. Please try again.

@bdach
Copy link
Collaborator

bdach commented Jan 11, 2024

it appears very large, I believe this started happening near the time depth mod was added

I would like a clear and reproducible description of the issue from someone please.

@Joehuu
Copy link
Member

Joehuu commented Jan 11, 2024

When the resume cursor appears, it is initially scaled:

public void Appear() => Schedule(() =>
{
updateColour();
this.ScaleTo(4).Then().ScaleTo(1, 1000, Easing.OutQuint);
});

The resume cursor also handles input, so in that 1 second, it has an unintended larger area to click on:
Kapture 2024-01-11 at 11 57 17

@peppy
Copy link
Member

peppy commented Jan 12, 2024

Probably fine?

@bdach
Copy link
Collaborator

bdach commented Jan 12, 2024

If it's what @Joehuu describes then yes I'd say it's a non-issue. But I'd actually like to hear that from @wawdili rather than other people passing by.

@nana123126
Copy link
Author

If it's what @Joehuu describes then yes I'd say it's a non-issue. But I'd actually like to hear that from @wawdili rather than other people passing by.

I think that by clicking like in the video, I can get a larger position offset after pausing, which is equivalent to the cursor teleporting to a farther position. However, if someone does this like me and logs in to play, will it affect the game balance?

For example, doing this in places where always almost hit. This is reflected on some beatmaps (such as having only one note placed far away).

Kanzen Shouri*Esper Girl [AF's Insane]
未标题-1
It looks simpler

@bdach
Copy link
Collaborator

bdach commented Jan 12, 2024

Okay so what you're saying that this is a gameplay fairness issue.

I'm not sure this is that important but I guess we can remove the scaling transition? I'd rather do that than have a "fake" hitbox that doesn't change scale.

@nana123126
Copy link
Author

Okay so what you're saying that this is a gameplay fairness issue.

I'm not sure this is that important but I guess we can remove the scaling transition? I'd rather do that than have a "fake" hitbox that doesn't change scale.

I think that's okay. And I think we can make the yellow cursor flicker to remind players of its position. (Like Kiai time?)

@frenzibyte
Copy link
Member

Okay so what you're saying that this is a gameplay fairness issue.

I'm not sure this is that important but I guess we can remove the scaling transition? I'd rather do that than have a "fake" hitbox that doesn't change scale.

Making the input handling area not change on scale looks to be easy, especially since OsuCursor already does something like this with its scale transition on press/release. Diff:

diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/OsuCursor.cs b/osu.Game.Rulesets.Osu/UI/Cursor/OsuCursor.cs
index 18351c20ce..eaf2c3493c 100644
--- a/osu.Game.Rulesets.Osu/UI/Cursor/OsuCursor.cs
+++ b/osu.Game.Rulesets.Osu/UI/Cursor/OsuCursor.cs
@@ -32,7 +32,7 @@ public partial class OsuCursor : SkinReloadableDrawable
         private SkinnableDrawable cursorSprite;
         private Container cursorScaleContainer = null!;
 
-        private Drawable expandTarget => (cursorSprite.Drawable as OsuCursorSprite)?.ExpandTarget ?? cursorSprite;
+        protected Drawable ExpandTarget => (cursorSprite.Drawable as OsuCursorSprite)?.ExpandTarget ?? cursorSprite;
 
         public IBindable<float> CursorScale => cursorScale;
 
@@ -106,10 +106,10 @@ public void Expand()
         {
             if (!cursorExpand) return;
 
-            expandTarget.ScaleTo(released_scale).ScaleTo(pressed_scale, 400, Easing.OutElasticHalf);
+            ExpandTarget.ScaleTo(released_scale).ScaleTo(pressed_scale, 400, Easing.OutElasticHalf);
         }
 
-        public void Contract() => expandTarget.ScaleTo(released_scale, 400, Easing.OutQuad);
+        public void Contract() => ExpandTarget.ScaleTo(released_scale, 400, Easing.OutQuad);
 
         /// <summary>
         /// Get the scale applicable to the ActiveCursor based on a beatmap's circle size.
diff --git a/osu.Game.Rulesets.Osu/UI/OsuResumeOverlay.cs b/osu.Game.Rulesets.Osu/UI/OsuResumeOverlay.cs
index f5e83f46f2..e75812d6e0 100644
--- a/osu.Game.Rulesets.Osu/UI/OsuResumeOverlay.cs
+++ b/osu.Game.Rulesets.Osu/UI/OsuResumeOverlay.cs
@@ -114,7 +114,7 @@ public void OnReleased(KeyBindingReleaseEvent<OsuAction> e)
             public void Appear() => Schedule(() =>
             {
                 updateColour();
-                this.ScaleTo(4).Then().ScaleTo(1, 1000, Easing.OutQuint);
+                ExpandTarget.ScaleTo(4).Then().ScaleTo(1, 1000, Easing.OutQuint);
             });
 
             private void updateColour()

master:

CleanShot.2024-01-12.at.16.37.01.mp4

diff:

CleanShot.2024-01-12.at.16.37.41.mp4

If it sounds good, I can open a PR for that (plus/minus some details to make code slightly more digestible).

@peppy
Copy link
Member

peppy commented Jan 15, 2024

Seems fine to apply that change. The animation does help for visibility of where the cursor is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants