From 52884c7f12967890ed7c66e5333d17d17ee9dc2d Mon Sep 17 00:00:00 2001 From: Richard Harrison Date: Sun, 14 May 2017 17:48:03 +0200 Subject: [PATCH] Multiplayer Dialog fixes. Change to use the ports defined in the property tree when connecting from the dialog. Ensure properties for ports are set to a valid (non zero, not null) value on dialog initialisation. Add ability to change receive port from dialog firstly to see what it is and secondly to allow multiple fg sessions --- gui/dialogs/multiplayer.xml | 37 +++++++++++++++++++++++++++++++------ 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/gui/dialogs/multiplayer.xml b/gui/dialogs/multiplayer.xml index 3111a67cc..0323e29b2 100644 --- a/gui/dialogs/multiplayer.xml +++ b/gui/dialogs/multiplayer.xml @@ -22,6 +22,12 @@ } } } + if (getprop("/sim/multiplay/rxport") == nil or getprop("/sim/multiplay/rxport") == 0) + setprop("/sim/multiplay/rxport",5000); + + if (getprop("/sim/multiplay/txport") == nil or getprop("/sim/multiplay/txport") == 0) + setprop("/sim/multiplay/txport",5000); + if (getprop("/sim/multiplay/protocol-version") == 2) setprop("/sim/gui/dialogs/multiplay/protocol-version", "Visible to only 2017+"); else @@ -229,7 +235,26 @@ /sim/gui/dialogs/multiplay/servers - + + hbox + 3 + 1 + + 2 + right + + + + 50 + left + /sim/multiplay/rxport + + + /sim/multiplay/online + + + + @@ -276,11 +301,11 @@ nasal