-
-
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
Question regarding using BeginChild() EndChild() to reenter windows context #3006
Comments
If we roll the naming convention back to the old way in BeginChildEx() everything works fine |
Hello, If you need to be apprending from different ID stack locations, just compute your ID once with
But that was incorrect in the first place so we are not going to revert to that. |
Thanks. We just wanted confirmation that we were going down the right path of generating the ID externally and modifying the code |
Closed |
(To clarify, you should NOT modify imgui.cpp at all.) The bug you accidentally relied on was fixed in 1.66:
Any |
Version/Branch of Dear ImGui:
Version:1.74
Branch: Master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_Opengl3.cpp + imgui_impl_glfw.cpp _
Compiler: VS2015
Operating System: Win7/10
Question
We are upgrading from v1.65 to v1.74 and ran into an issue re reentring child windows to append more UI elements as described in "tips - BeginChild()/ EndChild" to put ourselves into the window context at different parts of our app. We basically do a first pass where the splitters for our app are setup from a config file at startup and names/ paths of child windows are saved. Then on the second pass areas that have GUI controls are drawn by re-entering the context with the BeginChild/ EndChild method using the names from the first pass
The issue is that 1.74 has a name change in BeginChildEx() where a ImGuiId is now appended to the name so our technique of saving the name at the first pass breaks as the Id generated on second pass is different splitter setup as the hashing seed is probably different.
We see a comment in the Imgui.cpp file that says to use the BeginChild(Id) option with a stable value to append to same child from multiple locations in the stack.
So absolute name is just a hex code in this code and all the ID's are generated by us before calling any BeginChild() calls ?
Just wanted to verify that this is the preferred way consistent with your design philosophy
The text was updated successfully, but these errors were encountered: