Show advisory notice when UPNP isn't supported by the router
This commit is contained in:
committed by
Matthias Mailänder
parent
a79cc6a606
commit
c9c542cb37
@@ -94,6 +94,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (labelUPnP != null)
|
||||
labelUPnP.IsVisible = () => !Game.Settings.Server.DiscoverNatDevices;
|
||||
|
||||
var labelUPnPUnsupported = panel.GetOrNull<LabelWidget>("UPNP_UNSUPPORTED_NOTICE");
|
||||
if (labelUPnPUnsupported != null)
|
||||
labelUPnPUnsupported.IsVisible = () => Game.Settings.Server.DiscoverNatDevices && !Game.Settings.Server.AllowPortForward;
|
||||
|
||||
var passwordField = panel.GetOrNull<PasswordFieldWidget>("PASSWORD");
|
||||
if (passwordField != null)
|
||||
passwordField.Text = Game.Settings.Server.Password;
|
||||
|
||||
@@ -101,6 +101,15 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
||||
Align: Left
|
||||
WordWrap: True
|
||||
Text: Requires Network Discovery (UPnP). Enable in Settings - Advanced.
|
||||
Label@UPNP_UNSUPPORTED_NOTICE:
|
||||
X: 130
|
||||
Y: 180
|
||||
Width: 220
|
||||
Height: 25
|
||||
Font: Tiny
|
||||
Align: Left
|
||||
WordWrap: True
|
||||
Text: Your router does not seem to support UPnP. Please consult your router's manual.
|
||||
Container@SIDEBAR:
|
||||
X: PARENT_RIGHT-WIDTH
|
||||
Y: 30
|
||||
|
||||
@@ -101,6 +101,15 @@ Container@MULTIPLAYER_CREATESERVER_PANEL:
|
||||
Align: Left
|
||||
WordWrap: True
|
||||
Text: Requires Network Discovery (UPnP). Enable in Settings - Advanced.
|
||||
Label@UPNP_UNSUPPORTED_NOTICE:
|
||||
X: 130
|
||||
Y: 180
|
||||
Width: 220
|
||||
Height: 25
|
||||
Font: Tiny
|
||||
Align: Left
|
||||
WordWrap: True
|
||||
Text: Your router does not seem to support UPnP. Please consult your router's manual.
|
||||
Container@SIDEBAR:
|
||||
X: PARENT_RIGHT-WIDTH
|
||||
Y: 30
|
||||
|
||||
Reference in New Issue
Block a user