-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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
Using more than one Begin/EndChild for the same window breaks IsItemHovered() #8350
Comments
Isn't that what |
…f EndChild(). (#8350) Also made some of the fields accessible after BeginChild() to match Begin() logic.
It would indeed be an alternative. But append version of I'd like to keep this open as I would want to write more tests and explorer a few corner cases further. |
Adding link to #7506 |
I have amended the logic with a05d547 and added some basic tests ocornut/imgui_test_engine@7b68d89 This is not what you asked about but I also needed to clarify the return value of IsItemXXX right after BeginChild(). This is specced as returning title bar data for normal windows and not defined for child windows. I wanted to keep the possibility of adding title bars to child windows (I have a task for this actually) and thus intentionally made it that IsItemXXX after BeginChild() will still return false. But IsItemXXX AFTER |
…f EndChild(). (ocornut#8350) Also made some of the fields accessible after BeginChild() to match Begin() logic.
Version/Branch of Dear ImGui:
v1.91.3-docking
Back-ends:
custom
Compiler, OS:
Win10 + Clang & MSVC
Full config/build information:
Details:
When using more than one
Begin
/EndChild
pair for the same window a call toIsItemHovered()
doesn't return true when that window is hovered. The hovering or last item state seems to be reflecting the item created before the lastBegin
/EndChild
pair.For example, this code results in the GIF below
I would expect IsItemHovered() to refer to the window and not the button, is that not the case?
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: