MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / RenderText

Method RenderText

extern/imgui/imgui.cpp:3212–3236  ·  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

3210// Internal ImGui functions to render text
3211// RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()
3212void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
3213{
3214 ImGuiContext& g = *GImGui;
3215 ImGuiWindow* window = g.CurrentWindow;
3216
3217 // Hide anything after a '##' string
3218 const char* text_display_end;
3219 if (hide_text_after_hash)
3220 {
3221 text_display_end = FindRenderedTextEnd(text, text_end);
3222 }
3223 else
3224 {
3225 if (!text_end)
3226 text_end = text + strlen(text); // FIXME-OPT
3227 text_display_end = text_end;
3228 }
3229
3230 if (text != text_display_end)
3231 {
3232 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
3233 if (g.LogEnabled)
3234 LogRenderedText(&pos, text, text_display_end);
3235 }
3236}
3237
3238void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
3239{

Callers

nothing calls this directly

Calls 1

AddTextMethod · 0.80

Tested by

no test coverage detected