mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Misc renaming, comments. Docs: add missing spacing to Changelog.
This commit is contained in:
15
imgui.cpp
15
imgui.cpp
@ -3766,7 +3766,7 @@ void ImGui::NewFrame()
|
||||
window->Active = false;
|
||||
window->WriteAccessed = false;
|
||||
|
||||
// Garbage collect (this is totally functional but we may need decide if the side-effects are desirable)
|
||||
// Garbage collect transient buffers of recently unused windows
|
||||
if (!window->WasActive && !window->MemoryCompacted && window->LastTimeActive < memory_compact_start_time)
|
||||
GcCompactTransientWindowBuffers(window);
|
||||
}
|
||||
@ -3887,7 +3887,7 @@ void ImGui::Shutdown(ImGuiContext* context)
|
||||
IM_DELETE(g.Windows[i]);
|
||||
g.Windows.clear();
|
||||
g.WindowsFocusOrder.clear();
|
||||
g.WindowsSortBuffer.clear();
|
||||
g.WindowsTempSortBuffer.clear();
|
||||
g.CurrentWindow = NULL;
|
||||
g.CurrentWindowStack.clear();
|
||||
g.WindowsById.Clear();
|
||||
@ -4123,19 +4123,19 @@ void ImGui::EndFrame()
|
||||
|
||||
// Sort the window list so that all child windows are after their parent
|
||||
// We cannot do that on FocusWindow() because childs may not exist yet
|
||||
g.WindowsSortBuffer.resize(0);
|
||||
g.WindowsSortBuffer.reserve(g.Windows.Size);
|
||||
g.WindowsTempSortBuffer.resize(0);
|
||||
g.WindowsTempSortBuffer.reserve(g.Windows.Size);
|
||||
for (int i = 0; i != g.Windows.Size; i++)
|
||||
{
|
||||
ImGuiWindow* window = g.Windows[i];
|
||||
if (window->Active && (window->Flags & ImGuiWindowFlags_ChildWindow)) // if a child is active its parent will add it
|
||||
continue;
|
||||
AddWindowToSortBuffer(&g.WindowsSortBuffer, window);
|
||||
AddWindowToSortBuffer(&g.WindowsTempSortBuffer, window);
|
||||
}
|
||||
|
||||
// This usually assert if there is a mismatch between the ImGuiWindowFlags_ChildWindow / ParentWindow values and DC.ChildWindows[] in parents, aka we've done something wrong.
|
||||
IM_ASSERT(g.Windows.Size == g.WindowsSortBuffer.Size);
|
||||
g.Windows.swap(g.WindowsSortBuffer);
|
||||
IM_ASSERT(g.Windows.Size == g.WindowsTempSortBuffer.Size);
|
||||
g.Windows.swap(g.WindowsTempSortBuffer);
|
||||
g.IO.MetricsActiveWindows = g.WindowsActiveCount;
|
||||
|
||||
// Unlock font atlas
|
||||
@ -10119,6 +10119,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
||||
};
|
||||
|
||||
Funcs::NodeWindows(g.Windows, "Windows");
|
||||
//Funcs::NodeWindows(g.WindowsFocusOrder, "WindowsFocusOrder");
|
||||
if (ImGui::TreeNode("DrawLists", "Active DrawLists (%d)", g.DrawDataBuilder.Layers[0].Size))
|
||||
{
|
||||
for (int i = 0; i < g.DrawDataBuilder.Layers[0].Size; i++)
|
||||
|
Reference in New Issue
Block a user