From e30161c34e81deb45bfdee8ae4ad7cdea6574589 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 8 Mar 2020 16:19:58 +0100 Subject: [PATCH] Add IP/port tooltip to discovered clients list. --- profiler/src/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index b6923432..e7aa25c4 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -639,6 +639,15 @@ static void DrawContents() ImGuiSelectableFlags flags = ImGuiSelectableFlags_SpanAllColumns; if( badProto ) flags |= ImGuiSelectableFlags_Disabled; const bool selected = ImGui::Selectable( name->second.c_str(), &sel, flags ); + if( ImGui::IsItemHovered() ) + { + char portstr[32]; + sprintf( portstr, "%" PRIu32, v.second.port ); + ImGui::BeginTooltip(); + tracy::TextFocused( "IP:", v.second.address.c_str() ); + tracy::TextFocused( "Port:", portstr ); + ImGui::EndTooltip(); + } if( v.second.port != port ) { ImGui::SameLine();