mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-03 02:24:31 +00:00
Merged GetBackgroundDrawList()/GetForegroundDrawList() and GetBackgroundDrawList(ImGuiViewport* viewport)/GetForegroundDrawList(ImGuiViewport* viewport) api entry points.
This commit is contained in:
16
imgui.cpp
16
imgui.cpp
@@ -4519,26 +4519,18 @@ static ImDrawList* GetViewportBgFgDrawList(ImGuiViewportP* viewport, size_t draw
|
||||
|
||||
ImDrawList* ImGui::GetBackgroundDrawList(ImGuiViewport* viewport)
|
||||
{
|
||||
if (viewport == NULL)
|
||||
viewport = GImGui->CurrentWindow->Viewport;
|
||||
return GetViewportBgFgDrawList((ImGuiViewportP*)viewport, 0, "##Background");
|
||||
}
|
||||
|
||||
ImDrawList* ImGui::GetBackgroundDrawList()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return GetBackgroundDrawList(g.CurrentWindow->Viewport);
|
||||
}
|
||||
|
||||
ImDrawList* ImGui::GetForegroundDrawList(ImGuiViewport* viewport)
|
||||
{
|
||||
if (viewport == NULL)
|
||||
viewport = GImGui->CurrentWindow->Viewport;
|
||||
return GetViewportBgFgDrawList((ImGuiViewportP*)viewport, 1, "##Foreground");
|
||||
}
|
||||
|
||||
ImDrawList* ImGui::GetForegroundDrawList()
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
return GetForegroundDrawList(g.CurrentWindow->Viewport);
|
||||
}
|
||||
|
||||
ImDrawListSharedData* ImGui::GetDrawListSharedData()
|
||||
{
|
||||
return &GImGui->DrawListSharedData;
|
||||
|
||||
Reference in New Issue
Block a user