From bc3c375b02b5e70b4bc3b8d813af2f7b55c075b6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 26 Jun 2019 21:02:04 +0200 Subject: [PATCH] Display crash icon in notification area. --- server/TracyView.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 737c1c94..fc95ec45 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -595,6 +595,28 @@ bool View::DrawImpl() #endif const auto ty = ImGui::GetFontSize(); + auto& crash = m_worker.GetCrashEvent(); + if( crash.thread != 0 ) + { + ImGui::SameLine(); +#ifdef TRACY_EXTENDED_FONT + TextColoredUnformatted( ImVec4( 1, 0, 0, 1 ), ICON_FA_SKULL ); +#else + TextColoredUnformatted( ImVec4( 1, 0, 0, 1 ), "crash" ); +#endif + if( ImGui::IsItemHovered() ) + { + CrashTooltip(); + if( ImGui::IsMouseClicked( 0 ) ) + { + m_showInfo = true; + } + if( ImGui::IsMouseClicked( 2 ) ) + { + CenterAtTime( crash.time ); + } + } + } if( !m_worker.IsBackgroundDone() ) { ImGui::SameLine();