From 4f5286a86019f46ba6dca76625deb03e7d3a1afd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 3 Jun 2019 01:35:53 +0200 Subject: [PATCH] Add unformatted colored text extension function. --- server/TracyImGui.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index 95d0b809..fd33efb1 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -19,6 +19,13 @@ namespace tracy ImGui::TextUnformatted( text ); } + static inline void TextColoredUnformatted( const ImVec4& col, const char* text ) + { + ImGui::PushStyleColor( ImGuiCol_Text, col ); + ImGui::TextUnformatted( text ); + ImGui::PopStyleColor(); + } + static inline void TextDisabledUnformatted( const char* begin, const char* end = nullptr ) { ImGui::PushStyleColor( ImGuiCol_Text, GImGui->Style.Colors[ImGuiCol_TextDisabled] );