Fixed IsItemActive() lagging by one frame on initial widget activation (#840)

This commit is contained in:
ocornut 2016-09-25 14:32:38 +02:00
parent f2699de242
commit 6def01be5d

View File

@ -1828,6 +1828,8 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL)
g.ActiveId = id;
g.ActiveIdAllowOverlap = false;
g.ActiveIdIsJustActivated = true;
if (id)
g.ActiveIdIsAlive = true;
g.ActiveIdWindow = window;
}