don't display headers when player panel is invisible

This commit is contained in:
Matthias Mailänder
2014-03-09 19:43:15 +01:00
committed by Paul Chote
parent fafd9e81a9
commit 634567f98e

View File

@@ -114,6 +114,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
EditableSpectatorTemplate = Players.Get("TEMPLATE_EDITABLE_SPECTATOR");
NonEditableSpectatorTemplate = Players.Get("TEMPLATE_NONEDITABLE_SPECTATOR");
NewSpectatorTemplate = Players.Get("TEMPLATE_NEW_SPECTATOR");
var playerBinHeaders = lobby.GetOrNull<ContainerWidget>("LABEL_CONTAINER");
if (playerBinHeaders != null)
playerBinHeaders.IsVisible = () => panel == PanelType.Players;
colorPreview = lobby.Get<ColorPreviewManagerWidget>("COLOR_MANAGER");
colorPreview.Color = Game.Settings.Player.Color;