SetActiveId() sets ActiveIdIsJustActivated only when id changes. (#323)
This commit is contained in:
parent
ffdd7d7f17
commit
9f92cc255b
@ -1803,9 +1803,9 @@ ImGuiWindow* ImGui::GetParentWindow()
|
|||||||
void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL)
|
void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window = NULL)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
|
g.ActiveIdIsJustActivated = (g.ActiveId != id);
|
||||||
g.ActiveId = id;
|
g.ActiveId = id;
|
||||||
g.ActiveIdAllowOverlap = false;
|
g.ActiveIdAllowOverlap = false;
|
||||||
g.ActiveIdIsJustActivated = true;
|
|
||||||
g.ActiveIdWindow = window;
|
g.ActiveIdWindow = window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user