Better "no memory data" view in memory window.

This commit is contained in:
Bartosz Taudul 2024-09-28 02:00:56 +02:00
parent 219da446f4
commit 796f09ef23
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -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;
}