diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index cd497f1b..95d0b809 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -19,6 +19,20 @@ namespace tracy ImGui::TextUnformatted( text ); } + static inline void TextDisabledUnformatted( const char* begin, const char* end = nullptr ) + { + ImGui::PushStyleColor( ImGuiCol_Text, GImGui->Style.Colors[ImGuiCol_TextDisabled] ); + ImGui::TextUnformatted( begin, end ); + ImGui::PopStyleColor(); + } + + static inline void TextFocused( const char* label, const char* value ) + { + TextDisabledUnformatted( label ); + ImGui::SameLine(); + ImGui::TextUnformatted( value ); + } + static inline void DrawWaitingDots( double time ) { ImGui::TextUnformatted( "" ); diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7fba52d4..9cd686ee 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -372,20 +372,6 @@ static const char* MemSizeToString( int64_t val ) return buf; } -static void TextDisabledUnformatted( const char* begin, const char* end = nullptr ) -{ - ImGui::PushStyleColor(ImGuiCol_Text, GImGui->Style.Colors[ImGuiCol_TextDisabled]); - ImGui::TextUnformatted( begin, end ); - ImGui::PopStyleColor(); -} - -static void TextFocused( const char* label, const char* value ) -{ - TextDisabledUnformatted( label ); - ImGui::SameLine(); - ImGui::TextUnformatted( value ); -} - static void SetButtonHighlightColor() { ImGui::PushStyleColor( ImGuiCol_Button, (ImVec4)ImColor::HSV( 0.35f, 0.6f, 0.6f ) );