-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
implicit debug window disturbs IsPosHoveringAnyWindow() #1237
Comments
Nice catch, it's an interesting bug and I'm surprised it hasn't been caught before (but then Repro:
I'm looking into it now. |
|
By the way, even though I am going to fix this function, as outlined in the documentation you want to use |
Considering just removing this function:
Do anybody reading this as a legit use for this function? |
wow you are quick to react. I changed my code to use WantCaptureMouse, and it works. Missed that one. Thanks. |
I think the function still does makes sense. Maybe not for mouse input, but just for determining if an item at some coordinate of the gameview is above/below/covered-by the Gui. |
…ding (most people want to use io.WantCaptureMouse). Added dummy function with assert for now. (#1237)
I just removed it for now, because fixing it correctly isn't that trivial and as pointed above it's very unlikely people have been relying on a broken function. Totally happy to add a fixed version if someone ever has a need for it but right now I'm not aware of anyone using it and it's not worth adding a feature without a user. Thanks for your report! |
@ocornut sad to find it's never been properly fixed as it would have been a very useful set of functions in my case. |
Hi.
I am using the call to ImGui:: IsPosHoveringAnyWindow() to check if a user clicked a point not on any ImGui window, so I can interact with my gameview.
There is a debug-window created with the comment that it won't appear if it does not get any fields. But it still appears as a hit on IsPosHoveringAnyWindow(), creating a blind spot on my gamescreen.
Code in NewFrame() which creates it was this:
Right now, I am using a temporary fix inside FindHoveredWindow() , by not returning any hit which has the 'Accessed' flag false. Seems to work. But maybe there are conditions where this is not correct. Needs to be linked to the flag or condition which decides if the debug window is rendered or not.
Here is the diff of my workaround:
The text was updated successfully, but these errors were encountered: