-
Notifications
You must be signed in to change notification settings - Fork 502
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
sokol_nuklear.h: enable setting mouse cursor #1150
Conversation
Interesting, I never saw I'll let the CI complete and if everything is green I'll merge the PR (and will probably also update one of the sokol-samples to enable mouse cursors). |
Btw, I seem to remember that there was a specific reason that I'm initializing the mouse cursor before the switch with the currently active mouse cursor instead of Line 3007 in 7e50f80
(if your code somehow triggers that problem then we can still fix it in a separate PR I guess) |
Hmm, somehow I hadn't noticed that the Nuklear software mouse cursor is now always active... that definitely wasn't intended... (meaning that the Nuklear mouse cursor is always active since this PR was merged: #1138) |
Yeah, apparently |
I think I will just modify your code to work the same as sokol_imgui.h: rename the flag to PS: I will add two flags: |
Hmm ok, not so simple, looks like calling |
...I think I'll go with your original code :) |
Ok, one change I'll do after playing around with it: I'll move the code from the event handler to the start of the snk_render() function. Otherwise the mouse pointer gets stuck at the end of an operation until it is moved again. |
Ooof I broke it :D (forgot about the |
Ok, all green now. Thanks for the PR! |
Ok, the two nuklear sokol-samples now use your code: |
nice |
Add an option
enable_set_mouse_cursor
to enable setting OS mouse cursors withsapp_set_mouse_cursor
. By default Nuklear draws its' own custom cursor.It is the opposite of
disable_set_mouse_cursor
in sokol_imgui.h, to not break existing apps.Currently this option doesn't actually disable loading the custom cursor icons, and still requires you to call
nk_style_hide_cursor()
to hide Nuklear's cursor.