浏览代码

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

ocornut 9 年之前
父节点
当前提交
6def01be5d
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      imgui.cpp

+ 2 - 0
imgui.cpp

@@ -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;
 }