From c427214f46ea7db327adb79e69beac07e08a8908 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 2 Jul 2022 15:07:40 +0200 Subject: [PATCH] Move DrawHelpMarker to TracyImGui.hpp. --- server/TracyImGui.hpp | 14 ++++++++++++++ server/TracyView.cpp | 14 -------------- server/TracyView.hpp | 2 -- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index 3e92884a..565497b4 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -267,6 +267,20 @@ static const ImVec4 SyntaxColorsDimmed[] = { ImGui::EndTooltip(); } +[[maybe_unused]] void tracy_force_inline DrawHelpMarker( const char* desc ) +{ + TextDisabledUnformatted( "(?)" ); + if( ImGui::IsItemHovered() ) + { + const auto ty = ImGui::GetTextLineHeight(); + ImGui::BeginTooltip(); + ImGui::PushTextWrapPos( 450.0f * ty / 15.f ); + ImGui::TextUnformatted( desc ); + ImGui::PopTextWrapPos(); + ImGui::EndTooltip(); + } +} + } #endif diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 51f9a3bb..dadc6c38 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -250,20 +250,6 @@ bool View::ViewDispatch( const char* fileName, int line, uint64_t symAddr ) } } -void View::DrawHelpMarker( const char* desc ) const -{ - TextDisabledUnformatted( "(?)" ); - if( ImGui::IsItemHovered() ) - { - const auto ty = ImGui::GetTextLineHeight(); - ImGui::BeginTooltip(); - ImGui::PushTextWrapPos( 450.0f * ty / 15.f ); - ImGui::TextUnformatted( desc ); - ImGui::PopTextWrapPos(); - ImGui::EndTooltip(); - } -} - static const char* CompressionName[] = { "LZ4", "LZ4 HC", diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 1ee8b188..8fbef937 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -183,8 +183,6 @@ private: const char* ShortenNamespace( const char* name ) const; - void DrawHelpMarker( const char* desc ) const; - bool DrawImpl(); void DrawNotificationArea(); bool DrawConnection();