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
Hi, I'm posting this here for now because I can't tell if this is a CImGui issue or ImGui.
I started building an interface when I ran into bug where having a CollapsingHeader and InputText that both have the same label. It took me a while to narrow done the issue. If I have two collapsing headers, for example:
if CImGui.CollapsingHeader("Global")
returned = CImGui.InputText("Simulation", ...) <== InputText has same label as Header below
end
if CImGui.CollapsingHeader("Simulation")
end
Then expanding the Global header injects a input text field that happens to have the same label as the Simulation header section. This prevents the Simulation header from expanding. Once I relabeled the input text to something else then things began working again as expected.
Is this expected behavior? I couldn't find anything in the docs that says you can't have two different widget types with the same label. It seems every widget must have a different (i.e. unique) value.
Thoughts?
The text was updated successfully, but these errors were encountered:
Elements that are typically not clickable (such as calls to the Text functions) don't need an ID. Interactive widgets (such as calls to Button buttons) need a unique ID. Unique ID are used internally to track active widgets and occasionally associate state to widgets. Unique ID are implicitly built from the hash of multiple elements that identify the "path" to the UI element.
CollapsingHeader doesn't introduce a new id scope, so we need to add "##"s to enforce id uniqueness.
Hi, I'm posting this here for now because I can't tell if this is a CImGui issue or ImGui.
I started building an interface when I ran into bug where having a
CollapsingHeader
andInputText
that both have the same label. It took me a while to narrow done the issue. If I have two collapsing headers, for example:Then expanding the
Global
header injects a input text field that happens to have the same label as theSimulation
header section. This prevents theSimulation
header from expanding. Once I relabeled the input text to something else then things began working again as expected.Is this expected behavior? I couldn't find anything in the docs that says you can't have two different widget types with the same label. It seems every widget must have a different (i.e. unique) value.
Thoughts?
The text was updated successfully, but these errors were encountered: