You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of PushID in imgui.h hinted me that adding the calls would fix the issue and it indeed worked, but there were no indication that it was related except Q: 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.
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 PushID() you can directly specify an identifier for your input, e.g.
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.
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: