Skip to content

Commit

Permalink
Revert "Internals: Added LastActiveId, LastActiveIdTimer. (#1537)" Wi…
Browse files Browse the repository at this point in the history
…ll come up with a better design later.

This reverts commit 007f403.
  • Loading branch information
ocornut committed Jan 5, 2018
1 parent 007f403 commit 95b7733
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1929,14 +1929,7 @@ void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
ImGuiContext& g = *GImGui;
g.ActiveIdIsJustActivated = (g.ActiveId != id);
if (g.ActiveIdIsJustActivated)
{
g.ActiveIdTimer = 0.0f;
if (id != 0)
{
g.LastActiveId = id;
g.LastActiveIdTimer = 0.0f;
}
}
g.ActiveId = id;
g.ActiveIdAllowOverlap = false;
g.ActiveIdIsAlive |= (id != 0);
Expand Down Expand Up @@ -2315,7 +2308,6 @@ void ImGui::NewFrame()
ClearActiveID();
if (g.ActiveId)
g.ActiveIdTimer += g.IO.DeltaTime;
g.LastActiveIdTimer += g.IO.DeltaTime;
g.ActiveIdPreviousFrame = g.ActiveId;
g.ActiveIdIsAlive = false;
g.ActiveIdIsJustActivated = false;
Expand Down
4 changes: 0 additions & 4 deletions imgui_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,6 @@ struct ImGuiContext
bool ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
ImVec2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ImGuiWindow* ActiveIdWindow;
ImGuiID LastActiveId; // Store the last non-zero ActiveID, useful for animation.
float LastActiveIdTimer;
ImGuiWindow* MovingWindow; // Track the child window we clicked on to move a window.
ImGuiID MovingWindowMoveId; // == MovingWindow->MoveId
ImVector<ImGuiColMod> ColorModifiers; // Stack for PushStyleColor()/PopStyleColor()
Expand Down Expand Up @@ -631,8 +629,6 @@ struct ImGuiContext
ActiveIdAllowOverlap = false;
ActiveIdClickOffset = ImVec2(-1,-1);
ActiveIdWindow = NULL;
LastActiveId = 0;
LastActiveIdTimer = 0.0f;
MovingWindow = NULL;
MovingWindowMoveId = 0;

Expand Down

0 comments on commit 95b7733

Please sign in to comment.