From 3aed0ba1505c0d68bb04679c3a310db875bc1640 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 3 May 2020 14:33:11 +0200 Subject: [PATCH] Unformatted colored text printing with uint32 color. --- server/TracyImGui.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index d887299f..f020ee54 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -25,6 +25,13 @@ namespace tracy ImGui::TextUnformatted( text ); } + static inline void TextColoredUnformatted( uint32_t col, const char* text, const char* end = nullptr ) + { + ImGui::PushStyleColor( ImGuiCol_Text, col ); + ImGui::TextUnformatted( text, end ); + ImGui::PopStyleColor(); + } + static inline void TextColoredUnformatted( const ImVec4& col, const char* text, const char* end = nullptr ) { ImGui::PushStyleColor( ImGuiCol_Text, col );