Make the command bar directly check if a GuardOrderGenerator is active
This commit is contained in:
@@ -114,8 +114,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
BindButtonIcon(guardButton);
|
BindButtonIcon(guardButton);
|
||||||
|
|
||||||
guardButton.IsDisabled = () => { UpdateStateIfNecessary(); return guardDisabled; };
|
guardButton.IsDisabled = () => { UpdateStateIfNecessary(); return guardDisabled; };
|
||||||
guardButton.IsHighlighted = () => world.OrderGenerator is GenericSelectTarget
|
guardButton.IsHighlighted = () => world.OrderGenerator is GuardOrderGenerator;
|
||||||
&& ((GenericSelectTarget)world.OrderGenerator).OrderName == "Guard";
|
|
||||||
|
|
||||||
Action<bool> toggle = allowCancel =>
|
Action<bool> toggle = allowCancel =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user