mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-28 09:30:56 +01:00
Metrics: Displaying window position + moving extraneous line in IsPopupOpen().
This commit is contained in:
parent
b397fb507e
commit
0420ab027e
@ -3356,8 +3356,7 @@ void ImGui::EndTooltip()
|
|||||||
static bool IsPopupOpen(ImGuiID id)
|
static bool IsPopupOpen(ImGuiID id)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
const bool is_open = g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == id;
|
return g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == id;
|
||||||
return is_open;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark popup as open (toggle toward open state).
|
// Mark popup as open (toggle toward open state).
|
||||||
@ -9728,6 +9727,7 @@ void ImGui::ShowMetricsWindow(bool* p_open)
|
|||||||
if (!ImGui::TreeNode(window, "%s '%s', %d @ 0x%p", label, window->Name, window->Active || window->WasActive, window))
|
if (!ImGui::TreeNode(window, "%s '%s', %d @ 0x%p", label, window->Name, window->Active || window->WasActive, window))
|
||||||
return;
|
return;
|
||||||
NodeDrawList(window->DrawList, "DrawList");
|
NodeDrawList(window->DrawList, "DrawList");
|
||||||
|
ImGui::BulletText("Pos: (%.1f,%.1f)", window->Pos.x, window->Pos.y);
|
||||||
ImGui::BulletText("Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y);
|
ImGui::BulletText("Size: (%.1f,%.1f), SizeContents (%.1f,%.1f)", window->Size.x, window->Size.y, window->SizeContents.x, window->SizeContents.y);
|
||||||
ImGui::BulletText("Scroll: (%.2f,%.2f)", window->Scroll.x, window->Scroll.y);
|
ImGui::BulletText("Scroll: (%.2f,%.2f)", window->Scroll.x, window->Scroll.y);
|
||||||
if (window->RootWindow != window) NodeWindow(window->RootWindow, "RootWindow");
|
if (window->RootWindow != window) NodeWindow(window->RootWindow, "RootWindow");
|
||||||
|
Loading…
Reference in New Issue
Block a user