From f1bfbb9821444b9906594c5c1a981bf5acb727d6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 8 Sep 2024 17:47:46 +0200 Subject: [PATCH] Allow easy retrieval of git ref from the about dialog. --- profiler/src/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index edf60c90..68b8c131 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -721,6 +721,16 @@ static void DrawContents() tracy::TextCentered( tracy::GitRef ); ImGui::PopStyleColor(); ImGui::PopFont(); + if( ImGui::IsItemHovered() ) + { + ImGui::BeginTooltip(); + ImGui::TextUnformatted( "Click to copy git reference to clipboard" ); + ImGui::EndTooltip(); + if( ImGui::IsItemClicked() ) + { + ImGui::SetClipboardText( tracy::GitRef ); + } + } ImGui::Spacing(); ImGui::TextUnformatted( "A real time, nanosecond resolution, remote telemetry, hybrid\nframe and sampling profiler for games and other applications." ); ImGui::Spacing();