Merge pull request #11559 from MUzzell/feature-10416

Added ready checkbox for spectating admins
This commit is contained in:
abcdefg30
2016-07-15 15:47:05 +02:00
committed by GitHub
6 changed files with 80 additions and 5 deletions

View File

@@ -708,7 +708,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
{
@@ -754,6 +754,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
{
@@ -763,7 +766,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);