diff --git a/server/TracyImGui.hpp b/server/TracyImGui.hpp index 4c7c4f1e..092da73e 100644 --- a/server/TracyImGui.hpp +++ b/server/TracyImGui.hpp @@ -254,6 +254,14 @@ static const ImVec4 SyntaxColorsDimmed[] = { draw->AddPolyline( data, 3, col, 0, thickness ); } +[[maybe_unused]] static tracy_force_inline void TooltipIfHovered( const char* text ) +{ + if( !ImGui::IsItemHovered() ) return; + ImGui::BeginTooltip(); + ImGui::TextUnformatted( text ); + ImGui::EndTooltip(); +} + } #endif