mirror of https://github.com/ocornut/imgui
Internals: DrawData: We don't need an intermediate layer for popups.
This commit is contained in:
parent
0c06b43e6b
commit
1182174d81
|
@ -2895,8 +2895,6 @@ static void AddWindowToDrawDataSelectLayer(ImDrawDataBuilder* builder, ImGuiWind
|
|||
ImGuiContext& g = *GImGui;
|
||||
g.IO.MetricsActiveWindows++;
|
||||
if (window->Flags & ImGuiWindowFlags_Tooltip)
|
||||
AddWindowToRenderList(&builder->Layers[2], window);
|
||||
else if (window->Flags & ImGuiWindowFlags_Popup)
|
||||
AddWindowToRenderList(&builder->Layers[1], window);
|
||||
else
|
||||
AddWindowToRenderList(&builder->Layers[0], window);
|
||||
|
|
|
@ -465,7 +465,7 @@ struct IMGUI_API ImDrawListSharedData
|
|||
|
||||
struct ImDrawDataBuilder
|
||||
{
|
||||
ImVector<ImDrawList*> Layers[3]; // Layered for: regular, popup, tooltip
|
||||
ImVector<ImDrawList*> Layers[2]; // Global layers for: regular, tooltip
|
||||
|
||||
void Clear() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].resize(0); }
|
||||
void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].clear(); }
|
||||
|
|
Loading…
Reference in New Issue