mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Open connection popup when a connection is established.
This commit is contained in:
parent
368caddd00
commit
78a56640c3
@ -128,6 +128,7 @@ View::View( const char* addr, int port, ImFont* fixedWidth, ImFont* smallFont, I
|
|||||||
: m_worker( addr, port )
|
: m_worker( addr, port )
|
||||||
, m_staticView( false )
|
, m_staticView( false )
|
||||||
, m_pause( false )
|
, m_pause( false )
|
||||||
|
, m_forceConnectionPopup( true )
|
||||||
, m_frames( nullptr )
|
, m_frames( nullptr )
|
||||||
, m_messagesScrollBottom( true )
|
, m_messagesScrollBottom( true )
|
||||||
, m_smallFont( smallFont )
|
, m_smallFont( smallFont )
|
||||||
@ -508,8 +509,13 @@ bool View::DrawImpl()
|
|||||||
|
|
||||||
if( !m_staticView )
|
if( !m_staticView )
|
||||||
{
|
{
|
||||||
if( ImGui::Button( ICON_FA_WIFI ) )
|
if( ImGui::Button( ICON_FA_WIFI ) || m_forceConnectionPopup )
|
||||||
{
|
{
|
||||||
|
if( m_forceConnectionPopup )
|
||||||
|
{
|
||||||
|
m_forceConnectionPopup = false;
|
||||||
|
ImGui::SetNextWindowPos( ImGui::GetCursorPos() );
|
||||||
|
}
|
||||||
ImGui::OpenPopup( "TracyConnectionPopup" );
|
ImGui::OpenPopup( "TracyConnectionPopup" );
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -11265,6 +11271,7 @@ void View::DrawStatistics()
|
|||||||
ImGui::Indent( indentVal );
|
ImGui::Indent( indentVal );
|
||||||
}
|
}
|
||||||
const auto file = m_worker.GetString( srcloc.file );
|
const auto file = m_worker.GetString( srcloc.file );
|
||||||
|
|
||||||
ImGui::TextDisabled( "%s:%i", file, srcloc.line );
|
ImGui::TextDisabled( "%s:%i", file, srcloc.line );
|
||||||
if( ImGui::IsItemClicked( 1 ) )
|
if( ImGui::IsItemClicked( 1 ) )
|
||||||
{
|
{
|
||||||
|
@ -298,6 +298,7 @@ private:
|
|||||||
std::string m_filename;
|
std::string m_filename;
|
||||||
bool m_staticView;
|
bool m_staticView;
|
||||||
bool m_pause;
|
bool m_pause;
|
||||||
|
bool m_forceConnectionPopup = false;
|
||||||
|
|
||||||
ViewData m_vd;
|
ViewData m_vd;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user