-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Question about event handling #446
Comments
There is a flag io.WantMouseCapture that tells you if ImGui wants inputs based on the mouse position you gave it. Same for keyboard. |
Hm but in what file is this ? I'm doing a global text search in the master branch and I find no occurence of "WantMouseCapture" . |
Ok found it, it's named "WantCaptureMouse", thanks ! |
Sorry yes, mistyped that out of memory. Out of curiosity have you read the comments/instructions in imgui.cpp? You are right that I should add a reference to those fields in the example application to make the information more accessible. I'll add that to my notes. Let us know how that works. |
Hi,
As far as I've seen, example integrations don't show any way to have the app handle "left over" events, not captured by imgui. For example, I would have expected ImGui_ImplDX11_WndProcHandler to "grab" a mouse event only if it occurs inside a imgui window.
To use the mouse to move a camera in a 3d scene, I had to let my app peek at all events, even if they were in fact "belonging" to imgui. This causes the camera to move even for clicks in imgui windows.
What would be a correct pattern to handle correct event passing between imgui and host app ?
thanks
The text was updated successfully, but these errors were encountered: