From 77c9a8c407afc6df890217c7afee5dd10250b84d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 6 Jan 2019 19:14:24 +0100 Subject: [PATCH] Add support for notification text in View. --- server/TracyView.cpp | 6 ++++++ server/TracyView.hpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index c5b0c28e..a5c2499e 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -689,6 +689,12 @@ bool View::DrawImpl() #else ImGui::Text( "View span: %-10s Time span: %-10s ", TimeToString( m_zvEnd - m_zvStart ), TimeToString( m_worker.GetLastTime() - m_worker.GetTimeBegin() ) ); #endif + if( m_notificationTime > 0 ) + { + m_notificationTime -= io.DeltaTime; + ImGui::SameLine(); + ImGui::TextDisabled( m_notificationText.c_str() ); + } DrawFrames(); DrawZones(); ImGui::End(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 2c734119..af09d2ab 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -283,6 +283,9 @@ private: SetTitleCallback m_stcb; bool m_titleSet = false; + float m_notificationTime = 0; + std::string m_notificationText; + struct FindZone { enum : uint64_t { Unselected = std::numeric_limits::max() - 1 }; enum class GroupBy : int { Thread, UserText, Callstack };