Skip to content

Commit

Permalink
display port number together with IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
in0finite committed Apr 3, 2022
1 parent e0696f7 commit b961d7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NetworkDiscoveryHUD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ public void DisplayServers()
{
GUILayout.BeginHorizontal();

if( GUILayout.Button(info.EndPoint.Address.ToString(), GUILayout.Width(elemWidth)) )
bool hasGameServerPort = info.TryGetGameServerPort(out ushort gameServerPort);

if( GUILayout.Button(info.EndPoint.Address.ToString() + (hasGameServerPort ? $":{gameServerPort}" : ""), GUILayout.Width(elemWidth)) )
this.onConnectEvent.Invoke(info);

foreach(string headerName in headerNames.Skip(1))
Expand Down

0 comments on commit b961d7b

Please sign in to comment.