-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
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
Don't CaptureMouseFromApp() #533
Comments
Does #532 help? |
What does "NOT to handle mouse events" means? |
You say in #532:
I would like to achieve exactly the opposite: to hide the inputs from ImGui. Ok, you could say, I have the control over the Yeah, I would like to prevent the window from moving and scrolling, and instead let the "inner" scene to handle mouse events. |
You don't need to hide the input from ImGui, you need your application to read the inputs. Just test for IsItemHovered(), set your own flag and test this flag in your code that checks WantCapture* flags to accept the inputs when set. |
I think it does move the window, I'll check it. |
Dragging the image moves the window that contains it |
Use ImageButton() |
…earing the capture flag (#533) + demo + made code a little less messy
@dkrikun I have added a bool parameter to CaptureKeyboardFromApp() and CaptureKeyboardFromApp() so that may be used to easily communicate the information down to the main code. The demo code does:
I also tested that you can use ImageButton() or InvisibleButton() to prevent moving the window. Let me know if that works for you! |
Thanks :) |
I have a small scene to render inside imgui window. So I am rendering it to a texture and then displaying it in an image (as you've recommended in #530), and everything works great.
The problem is, I would like imgui NOT to handle mouse events when the focus is inside my image.
But
CaptureMouseFromApp()
only allows to force capture the input.The text was updated successfully, but these errors were encountered: