-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Handling mouse capture on 3D viewport window implemented using ImGui::Image() #4831
Comments
If confirmed that seems like a bug to me. |
I cannot seem to repro this. If I open the Demo under Inputs you can visualize Please clarify your statement with a repro and a video. |
I've confirmed that |
It looks like I have a 3D scene viewport imgui window, and user interacts with it using mouse. For example dragging mouse turns the camera: My existing logic uses I wonder what exactly would be the most correct way to deal with the issue. Options that I have considered:
I think I can get the last option to work, but I am curious if the first two options would make any sense at all. Thanks again! I was considering detecting when docking was in progr |
Yes, that's one of the condition which would make this flag true (there are other).
Sounds good.
Then please focus on making a repro and proving and fixing this because it should work.... assuming you are using
Inside your window you are likely submitting an Note that this is all because you want to use your own input data when clicking on that 3D viewport... you may as well simply use dear imgui inputs... Replace Image() by ImageButton() (without border) to make it interactive, then If in doubt about the meaning of some values 1) check demo 2) simply display them on the screen... |
Thank you very much. It works a bit differently (better!) from what I had expected:
I had implemented tracking in which window the drag was started in my application code and got the mouse working, but I replaced that as unnecessary, because |
I have one more issue: Combining Actual behavior when resizing a viewport window from the bottom right triangle:
Expected behavior:
I have intentionally zero window padding, and so the resizing triangle does overlap with the image. Thanks again! |
Version/Branch of Dear ImGui:
Version: 1.86
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: custom (erhe)
Compiler: Visual Studio 2022
Operating System: Windows 10
My Issue/Question:
I currently use
ImGuiIO::WantCaptureMouse
to see if I should process mouse events or not. When I am docking a window to another one, WantCaptureMouse seems not to be set.Is there a way to detect that docking is active? Or should I do something differently?
The text was updated successfully, but these errors were encountered: