void ReverseDisableOthers(IPopUp enablingPopUp) { IPopUp parentPopUp = enablingPopUp.GetParentPopUp(); if (parentPopUp != null) { parentPopUp.ReversePopUpDisableRecursively(); RegisterPopUp(parentPopUp); } else { thisRootUIElement.ReversePopUpDisableRecursively(); ClearActivePopUp(); } }
public bool IsAncestorOf(IPopUp other) { IPopUp popUpToExamine = other.GetParentPopUp(); while (true) { if (popUpToExamine == null) { return(false); } if (popUpToExamine == this) { return(true); } popUpToExamine = popUpToExamine.GetParentPopUp(); } }