#10416 Added ready checkbox for spectating admins

This commit is contained in:
Matthew Uzzell
2016-07-01 23:40:17 +01:00
parent fc50127390
commit 6110357460
6 changed files with 80 additions and 5 deletions

View File

@@ -745,7 +745,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
LobbyUtils.SetupEditableFactionWidget(template, slot, client, orderManager, factions);
LobbyUtils.SetupEditableTeamWidget(template, slot, client, orderManager, Map);
LobbyUtils.SetupEditableSpawnWidget(template, slot, client, orderManager, Map);
LobbyUtils.SetupEditableReadyWidget(template, slot, client, orderManager, Map, !Map.RulesLoaded || Map.InvalidCustomRules);
LobbyUtils.SetupEditableReadyWidget(template, slot, client, orderManager, Map);
}
else
{
@@ -791,6 +791,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
template = editableSpectatorTemplate.Clone();
LobbyUtils.SetupEditableNameWidget(template, null, c, orderManager);
if (client.IsAdmin)
LobbyUtils.SetupEditableReadyWidget(template, null, client, orderManager, Map);
}
else
{
@@ -800,7 +803,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
LobbyUtils.SetupNameWidget(template, null, client);
LobbyUtils.SetupKickWidget(template, null, client, orderManager, lobby,
() => panel = PanelType.Kick, () => panel = PanelType.Players);
() => panel = PanelType.Kick, () => panel = PanelType.Players);
if (client.IsAdmin)
LobbyUtils.SetupReadyWidget(template, null, client);
}
LobbyUtils.SetupClientWidget(template, c, orderManager, true);