mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-31 03:53:44 +01:00
Fixed GetFrontMostModalRootWindow() (#604)
This commit is contained in:
parent
ea6b615179
commit
544ba36bf6
@ -3210,8 +3210,8 @@ static void CloseInactivePopups()
|
|||||||
static ImGuiWindow* GetFrontMostModalRootWindow()
|
static ImGuiWindow* GetFrontMostModalRootWindow()
|
||||||
{
|
{
|
||||||
ImGuiState& g = *GImGui;
|
ImGuiState& g = *GImGui;
|
||||||
if (!g.OpenedPopupStack.empty())
|
for (int n = g.OpenedPopupStack.Size-1; n >= 0; n--)
|
||||||
if (ImGuiWindow* front_most_popup = g.OpenedPopupStack.back().Window)
|
if (ImGuiWindow* front_most_popup = g.OpenedPopupStack.Data[n].Window)
|
||||||
if (front_most_popup->Flags & ImGuiWindowFlags_Modal)
|
if (front_most_popup->Flags & ImGuiWindowFlags_Modal)
|
||||||
return front_most_popup;
|
return front_most_popup;
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user