From 4be2aa0682162e06de2b572ccf0ed825dc275f39 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 15 Mar 2022 17:26:12 +0100 Subject: [PATCH] Allow adding full-view annotations. --- server/TracyView.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 27513c37..547806aa 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -16135,9 +16135,20 @@ void View::DrawAnnotationList() ImGui::SetNextWindowSize( ImVec2( 600 * scale, 300 * scale ), ImGuiCond_FirstUseEver ); ImGui::Begin( "Annotation list", &m_showAnnotationList ); if( ImGui::GetCurrentWindowRead()->SkipItems ) { ImGui::End(); return; } + + if( ImGui::Button( ICON_FA_PLUS " Add annotation" ) ) + { + AddAnnotation( m_vd.zvStart, m_vd.zvEnd ); + } + + ImGui::SameLine(); + ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical ); + ImGui::SameLine(); + if( m_annotations.empty() ) { ImGui::TextWrapped( "No annotations." ); + ImGui::Separator(); ImGui::End(); return; }