mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +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::Text( "Connect to client" );
|
||||
ImGui::InputText( "", addr, 1024 );
|
||||
bool connectClicked = false;
|
||||
connectClicked |= ImGui::InputText( "", addr, 1024, ImGuiInputTextFlags_EnterReturnsTrue );
|
||||
if( !connHistVec.empty() )
|
||||
{
|
||||
ImGui::SameLine();
|
||||
@ -302,7 +303,8 @@ int main( int argc, char** argv )
|
||||
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 );
|
||||
auto it = connHistMap.find( addr );
|
||||
|
Loading…
Reference in New Issue
Block a user