override public bool CheckCondition() { AC.Menu _menu = PlayerMenus.GetMenuWithName(menuToCheck); if (_menu != null) { if (checkType == MenuCheckType.MenuIsVisible) { return(_menu.IsVisible()); } else if (checkType == MenuCheckType.MenuIsLocked) { return(_menu.isLocked); } else if (checkType == MenuCheckType.ElementIsVisible) { MenuElement _element = PlayerMenus.GetElementWithName(menuToCheck, elementToCheck); if (_element != null) { return(_element.IsVisible); } } } return(false); }
/** * <summary>Checks if the associated MenuElement is currently visible.</summary> * <returns>True if the associatated MenuElement is currently visible.</returns> */ public bool IsVisible() { if (element && menu) { if (!menu.IsVisible()) { return(false); } return(element.isVisible); } return(false); }