mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Merged GetBackgroundDrawList()/GetForegroundDrawList() and GetBackgroundDrawList(ImGuiViewport* viewport)/GetForegroundDrawList(ImGuiViewport* viewport) api entry points.
This commit is contained in:
parent
138d9d0c21
commit
3fec562da1
3 changed files with 10 additions and 16 deletions
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue