MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / RenderText

Method RenderText

Source/ThirdParty/imgui/imgui.cpp:2539–2563  ·  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

2537// Internal ImGui functions to render text
2538// RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()
2539void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
2540{
2541 ImGuiContext& g = *GImGui;
2542 ImGuiWindow* window = g.CurrentWindow;
2543
2544 // Hide anything after a '##' string
2545 const char* text_display_end;
2546 if (hide_text_after_hash)
2547 {
2548 text_display_end = FindRenderedTextEnd(text, text_end);
2549 }
2550 else
2551 {
2552 if (!text_end)
2553 text_end = text + strlen(text); // FIXME-OPT
2554 text_display_end = text_end;
2555 }
2556
2557 if (text != text_display_end)
2558 {
2559 window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
2560 if (g.LogEnabled)
2561 LogRenderedText(&pos, text, text_display_end);
2562 }
2563}
2564
2565void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
2566{

Callers

nothing calls this directly

Calls 1

AddTextMethod · 0.80

Tested by

no test coverage detected