mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 11:57:00 +00:00
Invisible child windows gets clipped earlier in the pipeline.
This commit is contained in:
parent
931a4c5b49
commit
f6414f2011
@ -1003,7 +1003,7 @@ void ImGuiWindow::AddToRenderList()
|
|||||||
for (size_t i = 0; i < DC.ChildWindows.size(); i++)
|
for (size_t i = 0; i < DC.ChildWindows.size(); i++)
|
||||||
{
|
{
|
||||||
ImGuiWindow* child = DC.ChildWindows[i];
|
ImGuiWindow* child = DC.ChildWindows[i];
|
||||||
IM_ASSERT(child->Visible); // Shouldn't be in this list if we are not active this frame
|
if (child->Visible) // clipped childs may have been marked not Visible
|
||||||
child->AddToRenderList();
|
child->AddToRenderList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1334,6 +1334,7 @@ static void AddWindowToSortedBuffer(ImGuiWindow* window, ImVector<ImGuiWindow*>&
|
|||||||
for (size_t i = 0; i < window->DC.ChildWindows.size(); i++)
|
for (size_t i = 0; i < window->DC.ChildWindows.size(); i++)
|
||||||
{
|
{
|
||||||
ImGuiWindow* child = window->DC.ChildWindows[i];
|
ImGuiWindow* child = window->DC.ChildWindows[i];
|
||||||
|
if (child->Visible)
|
||||||
AddWindowToSortedBuffer(child, sorted_windows);
|
AddWindowToSortedBuffer(child, sorted_windows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2176,8 +2177,8 @@ bool Begin(const char* name, bool* open, ImVec2 size, float fill_alpha, ImGuiWin
|
|||||||
// We also hide the window from rendering because we've already added its border to the command list.
|
// We also hide the window from rendering because we've already added its border to the command list.
|
||||||
// (we could perform the check earlier in the function but it is simplier at this point)
|
// (we could perform the check earlier in the function but it is simplier at this point)
|
||||||
// FIXME-WIP
|
// FIXME-WIP
|
||||||
//if (window->Collapsed)
|
if (window->Collapsed)
|
||||||
// window->Visible = false;
|
window->Visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return collapsed so that user can perform an early out optimisation
|
// Return collapsed so that user can perform an early out optimisation
|
||||||
|
Loading…
Reference in New Issue
Block a user