From 796f09ef23670c22e135222c50076de8979afbde Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 28 Sep 2024 02:00:56 +0200 Subject: [PATCH] Better "no memory data" view in memory window. --- profiler/src/profiler/TracyView_Memory.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/profiler/src/profiler/TracyView_Memory.cpp b/profiler/src/profiler/TracyView_Memory.cpp index bb53131a..3b6340f5 100644 --- a/profiler/src/profiler/TracyView_Memory.cpp +++ b/profiler/src/profiler/TracyView_Memory.cpp @@ -199,7 +199,12 @@ void View::DrawMemory() auto& mem = m_worker.GetMemoryNamed( m_memInfo.pool ); if( mem.data.empty() ) { - ImGui::TextWrapped( "No memory data collected." ); + const auto ty = ImGui::GetTextLineHeight(); + ImGui::PushFont( m_bigFont ); + ImGui::Dummy( ImVec2( 0, ( ImGui::GetContentRegionAvail().y - ImGui::GetTextLineHeight() * 2 ) * 0.5f ) ); + TextCentered( ICON_FA_DOG ); + TextCentered( "No memory data collected" ); + ImGui::PopFont(); ImGui::End(); return; }