Metrics: more details in popup stack (#272)

This commit is contained in:
ocornut 2015-07-14 09:09:52 -06:00
parent 4565bf9813
commit 52c820e7b0

View File

@ -12100,10 +12100,13 @@ void ImGui::ShowMetricsWindow(bool* opened)
Funcs::NodeDrawList(g.RenderDrawLists[0][i], "DrawList"); Funcs::NodeDrawList(g.RenderDrawLists[0][i], "DrawList");
ImGui::TreePop(); ImGui::TreePop();
} }
if (ImGui::TreeNode("Popups", "Opened Popups (%d)", g.OpenedPopupStack.Size)) if (ImGui::TreeNode("Popups", "Opened Popups Stack (%d)", g.OpenedPopupStack.Size))
{ {
for (int i = 0; i < g.OpenedPopupStack.Size; i++) for (int i = 0; i < g.OpenedPopupStack.Size; i++)
ImGui::BulletText("PopupID: %08x, Window: '%s'", g.OpenedPopupStack[i].PopupID, g.OpenedPopupStack[i].Window ? g.OpenedPopupStack[i].Window->Name : "NULL"); {
ImGuiWindow* window = g.OpenedPopupStack[i].Window;
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();
} }
g.DisableHideTextAfterDoubleHash--; g.DisableHideTextAfterDoubleHash--;