Show advisory notice when UPNP isn't supported by the router

This commit is contained in:
Oliver Brakmann
2016-08-28 13:40:12 +02:00
committed by Matthias Mailänder
parent a79cc6a606
commit c9c542cb37
3 changed files with 22 additions and 0 deletions

View File

@@ -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;