|
|
|
@ -2285,7 +2285,8 @@ void ImGui::SetHoveredID(ImGuiID id)
|
|
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
|
|
g.HoveredId = id;
|
|
|
|
|
g.HoveredIdAllowOverlap = false;
|
|
|
|
|
g.HoveredIdTimer = (id != 0 && g.HoveredIdPreviousFrame == id) ? (g.HoveredIdTimer + g.IO.DeltaTime) : 0.0f;
|
|
|
|
|
if (id != 0 && g.HoveredIdPreviousFrame != id)
|
|
|
|
|
g.HoveredIdTimer = 0.0f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ImGuiID ImGui::GetHoveredID()
|
|
|
|
@ -3897,6 +3898,8 @@ void ImGui::NewFrame()
|
|
|
|
|
// Clear reference to active widget if the widget isn't alive anymore
|
|
|
|
|
if (!g.HoveredIdPreviousFrame)
|
|
|
|
|
g.HoveredIdTimer = 0.0f;
|
|
|
|
|
if (g.HoveredId)
|
|
|
|
|
g.HoveredIdTimer += g.IO.DeltaTime;
|
|
|
|
|
g.HoveredIdPreviousFrame = g.HoveredId;
|
|
|
|
|
g.HoveredId = 0;
|
|
|
|
|
g.HoveredIdAllowOverlap = false;
|
|
|
|
|