-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
ImGui::InputTextMultiline assertion failed with ImGui::TreeNodeEx #7926
Comments
if (ImGui::TreeNodeEx("Shader edition:")) {
ImGui::InputTextMultiline("") You have an ID conflict here: both item are using the same identifier since identifiers are appended/stacked together. This is indeed covered by the giant FAQ blurb about how the ID Stack works. I think if you read that section carefully you would fully understand that using "" as an identifier is rarely the right thing (but sometimes it can be, notably right after a PushID()). You don't need to use if (ImGui::TreeNodeEx("Shader edition:")) {
ImGui::InputTextMultiline("##blabla") PS: "Version 1.85 WIP" is very old in dear imgui land, this is beyond the unsupported mark. Please update. |
Also #74, #96, #480, #501, #647, #654, #719, #843, #894, #1057, #1173, #1390, #1414, #1556, #1768, #2041, #2116, #2330, #2475, #2562, #2667, #2807, #2885, #3102, #3375, #3526, #3964, #4008, #4070, #4158, #4172, #4199, #4375, #4395, #4471, #4548, #4612, #4631, #4657, #4796, #5210, #5303, #5360, #5393, #5533, #5692, #5707, #5729, #5773, #5787, #5884, #6046, #6093, #6186, #6223, #6364, #6387, #6567, #6692, #6724, #6939, #6984, #7246, #7270, #7375, #7421, #7434, #7472, #7581, #7724, #7926, #7937 and probably more.. Tagging to increase visibility!
Version/Branch of Dear ImGui:
Version 1.85 WIP
Back-ends:
imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler, OS:
Windows 10 + gcc
Full config/build information:
No response
Details:
The following code creates the following assertion fail
Assertion failed at
imgui_widgets.cpp
line 627IM_ASSERT(mouse_button >= 0 && mouse_button < ImGuiMouseButton_COUNT);
It is fixed by adding the proper
PushID
andPopID
calls like so:I was surprised by it since I'm a beginner in ImGui, maybe there could be an assertion failed before, or a line of documentation / an answer in the QA at
http://dearimgui.org/faq
about it ? The documentation ofPushID
inimgui.h
hinted me that adding the calls would fix the issue and it indeed worked, but there were no indication that it was related exceptQ: Why is my widget not reacting when I click on it?
I'm leaving an issue as documentation for others since I didn't find this when looking in the closed issues. You can consider this issue as solved, but I would like if it were added to the QA or the documentation of
TreeNodeEx
or similar.Thanks !
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
Fixed with
The text was updated successfully, but these errors were encountered: