Add a notice why automatic port forwarding is disabled.

This commit is contained in:
Matthias Mailänder
2016-06-26 16:44:20 +02:00
parent 273dcce4d4
commit a79cc6a606
3 changed files with 22 additions and 0 deletions

View File

@@ -90,6 +90,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
checkboxUPnP.OnClick = () => allowPortForward ^= true;
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");
if (passwordField != null)
passwordField.Text = Game.Settings.Server.Password;