1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 12:23:53 +00:00

Streamline "waiting for connection" dialog.

This commit is contained in:
Bartosz Taudul 2020-09-06 13:54:22 +02:00
parent 3e34b3832a
commit 4b97528604

View File

@ -432,17 +432,15 @@ bool View::DrawImpl()
{ {
if( !m_worker.HasData() ) if( !m_worker.HasData() )
{ {
bool keepOpen = true;
char tmp[2048]; char tmp[2048];
sprintf( tmp, "%s###Connection", m_worker.GetAddr().c_str() ); sprintf( tmp, "%s###Connection", m_worker.GetAddr().c_str() );
ImGui::Begin( tmp, nullptr, ImGuiWindowFlags_AlwaysAutoResize ); ImGui::Begin( tmp, &keepOpen, ImGuiWindowFlags_AlwaysAutoResize );
TextCentered( ICON_FA_WIFI ); TextCentered( ICON_FA_WIFI );
ImGui::TextUnformatted( "Waiting for connection..." ); ImGui::TextUnformatted( "Waiting for connection..." );
DrawWaitingDots( s_time ); DrawWaitingDots( s_time );
ImGui::Spacing();
ImGui::Separator();
bool wasCancelled = ImGui::Button( "Cancel" );
ImGui::End(); ImGui::End();
return !wasCancelled; return keepOpen;
} }
if( !m_uarchSet ) if( !m_uarchSet )