Skip to content

Commit

Permalink
Exposed GetOverlayDrawList(). (~#545, ~#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
ocornut committed Dec 7, 2017
1 parent 8f41508 commit 20c7aab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2233,6 +2233,11 @@ int ImGui::GetFrameCount()
return GImGui->FrameCount;
}

ImDrawList* ImGui::GetOverlayDrawList()
{
return &GImGui->OverlayDrawList;
}

void ImGui::NewFrame()
{
ImGuiContext& g = *GImGui;
Expand Down
1 change: 1 addition & 0 deletions imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ namespace ImGui
IMGUI_API bool IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max); // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
IMGUI_API float GetTime();
IMGUI_API int GetFrameCount();
IMGUI_API ImDrawList* GetOverlayDrawList(); // this draw list will be the last rendered one, useful to quickly draw overlays shapes/text
IMGUI_API const char* GetStyleColorName(ImGuiCol idx);
IMGUI_API ImVec2 CalcItemRectClosestPoint(const ImVec2& pos, bool on_edge = false, float outward = +0.0f); // utility to find the closest point the last item bounding rectangle edge. useful to visually link items
IMGUI_API ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f);
Expand Down

0 comments on commit 20c7aab

Please sign in to comment.