MCPcopy Create free account
hub / github.com/brenocq/implot3d / AddTextCentered

Function AddTextCentered

implot3d.cpp:279–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

277}
278
279void AddTextCentered(ImDrawList* draw_list, ImVec2 top_center, ImU32 col, const char* text_begin) {
280 const char* text_end = ImGui::FindRenderedTextEnd(text_begin);
281 ImVec2 text_size = ImGui::CalcTextSize(text_begin, text_end, true);
282 draw_list->AddText(ImVec2(top_center.x - text_size.x * 0.5f, top_center.y), col, text_begin, text_end);
283}
284
285//-----------------------------------------------------------------------------
286// [SECTION] Legend Utils

Callers 1

SetupLockFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected