enhanced UPnP discovery usability

- don't search for NATs forever, 5 seconds seem to be enough
- disable the UPnP checkbox if discovery failed
- no computer industry acronyms in user GUI
- don't remove port-forwarding twice, just once on shutdown
- user-configurable settings for debugging
This commit is contained in:
Matthias Mailänder
2013-04-06 12:54:41 +02:00
parent 083d59613a
commit 0488903a15
6 changed files with 30 additions and 10 deletions

View File

@@ -69,6 +69,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
var UPnPCheckbox = panel.Get<CheckboxWidget>("UPNP_CHECKBOX");
UPnPCheckbox.IsChecked = () => allowUPnP;
UPnPCheckbox.OnClick = () => allowUPnP ^= true;
UPnPCheckbox.IsDisabled = () => !Game.Settings.Server.NatDeviceAvailable;
}
void CreateAndJoin()