Skip to content

[rcore][web] Support mouse position update on HideCursor() #4955

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Moros1138
Copy link

Fixes Issue #4940

The problem is relatively simple, CORE.Input.Mouse.cursorHidden was being used for both hiding the cursor and locking the cursor. This PR adds a variable to track when the cursor is locked so that the 2 states can be tracked independently of eachother.

@raysan5
Copy link
Owner

raysan5 commented May 29, 2025

@Moros1138 My concern with this change is if it will change examples behaviour between platforms... if that's the case it should be addressed on all platforms.

@raysan5 raysan5 changed the title [rcore][web] fix mouse position locking in HideCursor [rcore][web] Support mouse position update on HideCursor() May 29, 2025
@raysan5 raysan5 added the platform: Web Web platform label May 29, 2025
@Moros1138
Copy link
Author

Sorry for the after-editing, I compared the behavior with windows and made further changes to make the way web handles it closer to how it works on windows.. Here's a video

demo-mouse-hide-lock.mp4

@Moros1138
Copy link
Author

Moros1138 commented May 29, 2025

@Moros1138 My concern with this change is if it will change examples behaviour between platforms... if that's the case it should be addressed on all platforms.

@raysan5 I was seeking to make the web platform work more as it does on windows. See video in previous post.

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

Successfully merging this pull request may close these issues.

2 participants