Hide the Ready checkbox when a spectator transfers away Admin.
This commit is contained in:
@@ -646,6 +646,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
if (client.IsAdmin)
|
if (client.IsAdmin)
|
||||||
LobbyUtils.SetupEditableReadyWidget(template, null, client, orderManager, map);
|
LobbyUtils.SetupEditableReadyWidget(template, null, client, orderManager, map);
|
||||||
|
else
|
||||||
|
LobbyUtils.HideReadyWidgets(template);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -661,6 +663,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
if (client.IsAdmin)
|
if (client.IsAdmin)
|
||||||
LobbyUtils.SetupReadyWidget(template, null, client);
|
LobbyUtils.SetupReadyWidget(template, null, client);
|
||||||
|
else
|
||||||
|
LobbyUtils.HideReadyWidgets(template);
|
||||||
}
|
}
|
||||||
|
|
||||||
LobbyUtils.SetupLatencyWidget(template, c, orderManager, true);
|
LobbyUtils.SetupLatencyWidget(template, c, orderManager, true);
|
||||||
|
|||||||
@@ -564,6 +564,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
parent.Get<ImageWidget>("STATUS_IMAGE").IsVisible = () => c.IsReady || c.Bot != null;
|
parent.Get<ImageWidget>("STATUS_IMAGE").IsVisible = () => c.IsReady || c.Bot != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void HideReadyWidgets(Widget parent)
|
||||||
|
{
|
||||||
|
HideChildWidget(parent, "STATUS_CHECKBOX");
|
||||||
|
HideChildWidget(parent, "STATUS_IMAGE");
|
||||||
|
}
|
||||||
|
|
||||||
public static void AddPlayerFlagAndName(ScrollItemWidget template, Player player)
|
public static void AddPlayerFlagAndName(ScrollItemWidget template, Player player)
|
||||||
{
|
{
|
||||||
var flag = template.Get<ImageWidget>("FLAG");
|
var flag = template.Get<ImageWidget>("FLAG");
|
||||||
|
|||||||
Reference in New Issue
Block a user