MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / RenderText

Method RenderText

lib/imgui/imgui.cpp:2312–2336  ·  view source on GitHub ↗

Internal ImGui functions to render text RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()

Source from the content-addressed store, hash-verified

2310// Internal ImGui functions to render text
2311// RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()
2312void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
2313{
2314 ImGuiContext& g = *GImGui;
2315 ImGuiWindow* window = g.CurrentWindow;
2316
2317 // Hide anything after a '##' string
2318 const char* text_display_end;
2319 if (hide_text_after_hash)
2320 {
2321 text_display_end = FindRenderedTextEnd(text, text_end);
2322 }
2323 else
2324 {
2325 if (!text_end)
2326 text_end = text + strlen(text); // FIXME-OPT
2327 text_display_end = text_end;
2328 }
2329
2330 if (text != text_display_end)
2331 {
2332 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
2333 if (g.LogEnabled)
2334 LogRenderedText(&pos, text, text_display_end);
2335 }
2336}
2337
2338void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
2339{

Callers

nothing calls this directly

Calls 1

AddTextMethod · 0.80

Tested by

no test coverage detected