mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
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;
|
ImGuiContext& g = *GImGui;
|
||||||
g.IO.MetricsActiveWindows++;
|
g.IO.MetricsActiveWindows++;
|
||||||
if (window->Flags & ImGuiWindowFlags_Tooltip)
|
if (window->Flags & ImGuiWindowFlags_Tooltip)
|
||||||
AddWindowToRenderList(&builder->Layers[2], window);
|
|
||||||
else if (window->Flags & ImGuiWindowFlags_Popup)
|
|
||||||
AddWindowToRenderList(&builder->Layers[1], window);
|
AddWindowToRenderList(&builder->Layers[1], window);
|
||||||
else
|
else
|
||||||
AddWindowToRenderList(&builder->Layers[0], window);
|
AddWindowToRenderList(&builder->Layers[0], window);
|
||||||
|
@ -465,7 +465,7 @@ struct IMGUI_API ImDrawListSharedData
|
|||||||
|
|
||||||
struct ImDrawDataBuilder
|
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 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(); }
|
void ClearFreeMemory() { for (int n = 0; n < IM_ARRAYSIZE(Layers); n++) Layers[n].clear(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user