| 277 | } |
| 278 | |
| 279 | void 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 |