Make overlay dropdown optional
This commit is contained in:
@@ -71,12 +71,15 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
var copyOverlayDropdown = widget.Get<DropDownButtonWidget>("OVERLAY_BUTTON");
|
var overlayDropdown = widget.GetOrNull<DropDownButtonWidget>("OVERLAY_BUTTON");
|
||||||
copyOverlayDropdown.OnMouseDown = _ =>
|
if (overlayDropdown != null)
|
||||||
{
|
{
|
||||||
copyOverlayDropdown.RemovePanel();
|
overlayDropdown.OnMouseDown = _ =>
|
||||||
copyOverlayDropdown.AttachPanel(CreateOverlaysPanel(world));
|
{
|
||||||
};
|
overlayDropdown.RemovePanel();
|
||||||
|
overlayDropdown.AttachPanel(CreateOverlaysPanel(world));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var cashLabel = widget.GetOrNull<LabelWidget>("CASH_LABEL");
|
var cashLabel = widget.GetOrNull<LabelWidget>("CASH_LABEL");
|
||||||
if (cashLabel != null)
|
if (cashLabel != null)
|
||||||
|
|||||||
Reference in New Issue
Block a user