-
Notifications
You must be signed in to change notification settings - Fork 590
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
Certain mouse events don't work #7
Comments
Don't have time to analyze your code (hopefully someone else will), but there are several things in Nuklear to consider when having this issue (the following is not exhaustive).
|
It was partially because of my implementation. But it worked after I got rid off NK_KEYSTATE_BASED_INPUT and sent it to nk through callbacks, so perhaps that is an issue? |
I remember some issues with the two input "modes" (one reacting on rising edge and the other on the falling edge). You have to use the correct one for your chosen backend. And of course, there might still be some bugs. Feel free to read all |
Now I noticed what you were talking about; clicking through a tooltip or checkbox. It should consume it instead of keep checking if the mouse is in the area |
Yep, that was the effect of incorrect usage of /// NK_KEYSTATE_BASED_INPUT | Define this if your backend uses key state for each frame rather than key press/release events and also maybe some bug(s). |
I don't use that anymore |
It's because mouse events aren't consumed or because the order of when a click is used is wrong. |
That sounds to me like the known problem with overlapping widgets/windows (especially popups and menus). Everything overlapping doesn't have first class support in Nuklear and is 1 frame late thus making place for weird states and bugs. This is not easily solvable in an elegant way (there is actually a way - see https://github.com/Immediate-Mode-UI/Quarks ). Could this be the reason for the poor experience you're describing? |
Yes, it is fixed in #14 |
My guess is that point->box checks are broken, but it can also obviously also be my code.
The following work fine: sliders, progress bars. Trying to use anything else however, won't work correctly. Other things such as radio, push buttons, sliders and checkboxes don't work. Sliders however do work sometimes, but barely.
https://imgur.com/a/VQYFFRs
The code can be found at on my repo but can only be built on Windows with CMake.
NK code
Render code (after nk code)
Input events
The text was updated successfully, but these errors were encountered: