mirror of https://github.com/ocornut/imgui
Metrics: showing some internal state
This commit is contained in:
parent
b76353bbb1
commit
43d073db1e
11
imgui.cpp
11
imgui.cpp
|
@ -8848,7 +8848,7 @@ void ImGui::ShowMetricsWindow(bool* opened)
|
||||||
ImGui::Text("%d vertices, %d indices (%d triangles)", ImGui::GetIO().MetricsRenderVertices, ImGui::GetIO().MetricsRenderIndices, ImGui::GetIO().MetricsRenderIndices / 3);
|
ImGui::Text("%d vertices, %d indices (%d triangles)", ImGui::GetIO().MetricsRenderVertices, ImGui::GetIO().MetricsRenderIndices, ImGui::GetIO().MetricsRenderIndices / 3);
|
||||||
ImGui::Text("%d allocations", ImGui::GetIO().MetricsAllocs);
|
ImGui::Text("%d allocations", ImGui::GetIO().MetricsAllocs);
|
||||||
static bool show_clip_rects = true;
|
static bool show_clip_rects = true;
|
||||||
ImGui::Checkbox("Show clipping rectangles when hovering ImDrawList", &show_clip_rects);
|
ImGui::Checkbox("Show clipping rectangles when hovering a ImDrawCmd", &show_clip_rects);
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
struct Funcs
|
struct Funcs
|
||||||
|
@ -8926,6 +8926,15 @@ void ImGui::ShowMetricsWindow(bool* opened)
|
||||||
ImGui::BulletText("PopupID: %08x, Window: '%s'%s%s", g.OpenedPopupStack[i].PopupID, window ? window->Name : "NULL", window && (window->Flags & ImGuiWindowFlags_ChildWindow) ? " ChildWindow" : "", window && (window->Flags & ImGuiWindowFlags_ChildMenu) ? " ChildMenu" : "");
|
ImGui::BulletText("PopupID: %08x, Window: '%s'%s%s", g.OpenedPopupStack[i].PopupID, window ? window->Name : "NULL", window && (window->Flags & ImGuiWindowFlags_ChildWindow) ? " ChildWindow" : "", window && (window->Flags & ImGuiWindowFlags_ChildMenu) ? " ChildMenu" : "");
|
||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
if (ImGui::TreeNode("Basic state"))
|
||||||
|
{
|
||||||
|
ImGui::Text("FocusedWindow: '%s'", g.FocusedWindow ? g.FocusedWindow->Name : "NULL");
|
||||||
|
ImGui::Text("HoveredWindow: '%s'", g.HoveredWindow ? g.HoveredWindow->Name : "NULL");
|
||||||
|
ImGui::Text("HoveredRootWindow: '%s'", g.HoveredRootWindow ? g.HoveredRootWindow->Name : "NULL");
|
||||||
|
ImGui::Text("HoveredID: 0x%08X/0x%08X", g.HoveredId, g.HoveredIdPreviousFrame); // Data is "in-flight" so depending on when the Metrics window is called we may see current frame information or not
|
||||||
|
ImGui::Text("ActiveID: 0x%08X/0x%08X", g.ActiveId, g.ActiveIdPreviousFrame);
|
||||||
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
g.DisableHideTextAfterDoubleHash--;
|
g.DisableHideTextAfterDoubleHash--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue