mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-29 16:54:35 +00:00
Pressing enter key when entering client address automatically connects.
This commit is contained in:
parent
cd8d86edf3
commit
e1bd5c092b
@ -274,7 +274,8 @@ int main( int argc, char** argv )
|
|||||||
}
|
}
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::Text( "Connect to client" );
|
ImGui::Text( "Connect to client" );
|
||||||
ImGui::InputText( "", addr, 1024 );
|
bool connectClicked = false;
|
||||||
|
connectClicked |= ImGui::InputText( "", addr, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
|
||||||
if( !connHistVec.empty() )
|
if( !connHistVec.empty() )
|
||||||
{
|
{
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
@ -302,7 +303,8 @@ int main( int argc, char** argv )
|
|||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( ImGui::Button( ICON_FA_WIFI " Connect" ) && *addr && !loadThread.joinable() )
|
connectClicked |= ImGui::Button( ICON_FA_WIFI " Connect" );
|
||||||
|
if( connectClicked && *addr && !loadThread.joinable() )
|
||||||
{
|
{
|
||||||
std::string addrStr( addr );
|
std::string addrStr( addr );
|
||||||
auto it = connHistMap.find( addr );
|
auto it = connHistMap.find( addr );
|
||||||
|
Loading…
Reference in New Issue
Block a user