Add a notice why automatic port forwarding is disabled.
This commit is contained in:
@@ -90,6 +90,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
checkboxUPnP.OnClick = () => allowPortForward ^= true;
|
checkboxUPnP.OnClick = () => allowPortForward ^= true;
|
||||||
checkboxUPnP.IsDisabled = () => !Game.Settings.Server.AllowPortForward;
|
checkboxUPnP.IsDisabled = () => !Game.Settings.Server.AllowPortForward;
|
||||||
|
|
||||||
|
var labelUPnP = panel.GetOrNull<LabelWidget>("UPNP_NOTICE");
|
||||||
|
if (labelUPnP != null)
|
||||||
|
labelUPnP.IsVisible = () => !Game.Settings.Server.DiscoverNatDevices;
|
||||||
|
|
||||||
var passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
|
var passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
|
||||||
if (passwordField != null)
|
if (passwordField != null)
|
||||||
passwordField.Text = Game.Settings.Server.Password;
|
passwordField.Text = Game.Settings.Server.Password;
|
||||||
|
|||||||
@@ -92,6 +92,15 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Automatic port forwarding
|
Text: Automatic port forwarding
|
||||||
|
Label@UPNP_NOTICE:
|
||||||
|
X: 130
|
||||||
|
Y: 180
|
||||||
|
Width: 200
|
||||||
|
Height: 25
|
||||||
|
Font: Tiny
|
||||||
|
Align: Left
|
||||||
|
WordWrap: True
|
||||||
|
Text: Requires Network Discovery (UPnP). Enable in Settings - Advanced.
|
||||||
Container@SIDEBAR:
|
Container@SIDEBAR:
|
||||||
X: PARENT_RIGHT-WIDTH
|
X: PARENT_RIGHT-WIDTH
|
||||||
Y: 30
|
Y: 30
|
||||||
|
|||||||
@@ -92,6 +92,15 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
|||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Automatic port forwarding
|
Text: Automatic port forwarding
|
||||||
|
Label@UPNP_NOTICE:
|
||||||
|
X: 130
|
||||||
|
Y: 180
|
||||||
|
Width: 200
|
||||||
|
Height: 25
|
||||||
|
Font: Tiny
|
||||||
|
Align: Left
|
||||||
|
WordWrap: True
|
||||||
|
Text: Requires Network Discovery (UPnP). Enable in Settings - Advanced.
|
||||||
Container@SIDEBAR:
|
Container@SIDEBAR:
|
||||||
X: PARENT_RIGHT-WIDTH
|
X: PARENT_RIGHT-WIDTH
|
||||||
Y: 30
|
Y: 30
|
||||||
|
|||||||
Reference in New Issue
Block a user