Add requires-auth indicator to the server lists.

This commit is contained in:
Paul Chote
2018-08-12 13:12:57 +00:00
committed by reaperrr
parent e374c8e6c3
commit 8634c001f9
13 changed files with 70 additions and 16 deletions

View File

@@ -599,6 +599,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
password.GetImageName = () => canJoin ? "protected" : "protected-disabled";
}
var auth = item.GetOrNull<ImageWidget>("REQUIRES_AUTHENTICATION");
if (auth != null)
{
auth.IsVisible = () => game.Authentication;
auth.GetImageName = () => canJoin ? "authentication" : "authentication-disabled";
if (game.Protected && password != null)
auth.Bounds.X -= password.Bounds.Width + 5;
}
var players = item.GetOrNull<LabelWithTooltipWidget>("PLAYERS");
if (players != null)
{