-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Description
Version/Branch of Dear ImGui: 1.88 WIP
Version: 1.88 WIP
Branch: Docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_sdl.cpp + imgui_impl_sdl_renderer.cpp
Compiler: MSVC 1929
Operating System: Win64
My Issue/Question:
I'm using ImGuiIDs to keep track of some stateful data and noticed that when I use GetID() before using InputInt() if I try to change the value using keyboard input I get an assertion in ImGui::MarkItemEdited() on IM_ASSERT(g.ActiveId == id || g.ActiveId == 0 || g.DragDropActive);
where g.ActiveId seems to be the correct ID for my element but id is 0.
A minimal example of a repo is below.
static int testInt = 60;
auto const id = ImGui::GetID("Test Int");
ImGui::InputInt("Test Int", &testInt);
When selecting the input and hitting a key the assertion is fired. Note that it doesn't happen with InputFloat or InputInt with 0 as the stepping value (stepping buttons removed).