From d734aaa357aabba73439f1c3b997206d091f3014 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 28 Sep 2024 01:39:49 +0200 Subject: [PATCH] Improve "no data" screens in statistics window. --- profiler/src/profiler/TracyView_Statistics.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyView_Statistics.cpp b/profiler/src/profiler/TracyView_Statistics.cpp index a8e5c5f3..bf4cec7d 100644 --- a/profiler/src/profiler/TracyView_Statistics.cpp +++ b/profiler/src/profiler/TracyView_Statistics.cpp @@ -46,7 +46,12 @@ void View::DrawStatistics() #else if( !m_worker.AreSourceLocationZonesReady() && ( !m_worker.AreCallstackSamplesReady() || m_worker.GetCallstackSampleCount() == 0 ) ) { - ImGui::TextWrapped( "Please wait, computing data..." ); + const auto ty = ImGui::GetTextLineHeight(); + ImGui::PushFont( m_bigFont ); + ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 - ty ) * 0.5f ) ); + TextCentered( ICON_FA_HIPPO ); + TextCentered( "Please wait, computing data..." ); + ImGui::PopFont(); DrawWaitingDots( s_time ); ImGui::End(); return; @@ -589,7 +594,11 @@ void View::DrawStatistics() { if( srcloc.empty() ) { - ImGui::TextUnformatted( "No entries to be displayed." ); + ImGui::PushFont( m_bigFont ); + ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 ) * 0.5f ) ); + TextCentered( ICON_FA_HIPPO ); + TextCentered( "No entries to be displayed" ); + ImGui::PopFont(); } else {