4ian / GDevelop

🎮 Open-source, cross-platform 2D/3D/multiplayer game engine designed for everyone.
https://gdevelop.io
Other
7.86k stars 761 forks source link

Hide cursor not working #6028

Open VegeTato opened 7 months ago

VegeTato commented 7 months ago

Is there an existing issue for this?

Describe the bug

As the title says, after the last few updates of GDevelop, the action Hide cursor most of the time is not working in GDevelop preview, it works on other platforms (GDgames/itch...etc), but in gdevelop preview it's not, as you can see in the video, many times it doesn't hide the cursor, and few times it does.

https://github.com/4ian/GDevelop/assets/81715237/167cc726-08f3-4193-87f5-835c07261ab3

Steps to reproduce

  1. Create new empty project.
  2. Condition: at the beginning of the scene/ Action: Hide cursor.
  3. Cursor most of the time won't be hidden.

GDevelop platform

Desktop

GDevelop version

Latest version

Platform info

No response

Additional context

No response

ClementPasteau commented 7 months ago

I can reproduce the issue. It seems that it depends on the mouse being detected or not in the screen when the action is triggered. If the mouse was outside of the window, or not detected as in the window, it will not be hidden on the frame "beginning of scene".

To confirm this, if you remove the "At the beginning of the scene", it triggers on every frame, and the cursor is always hidden. Can you confirm, removing the condition makes it work @VegeTato ?

VegeTato commented 7 months ago

I can reproduce the issue. It seems that it depends on the mouse being detected or not in the screen when the action is triggered. If the mouse was outside of the window, or not detected as in the window, it will not be hidden on the frame "beginning of scene".

To confirm this, if you remove the "At the beginning of the scene", it triggers on every frame, and the cursor is always hidden. Can you confirm, removing the condition makes it work @VegeTato ?

Yes, I can confirm it works perfectly after removing the condition At the beginning of the scene, Only when i move the cursor or click on the preview though, for example: Empty condition/hide cursor action → F4 → Preview started → don't move your cursor → the cursor will stay visible until you move the cursor OR until you click on the preview (using mouse buttons) then it gets hidden