private void Hide_BotherPanels(UIMenuListItem item) { List <UIMenuListItem> childList = GetChildItems(item.Parent); for (int i = 0; i < childList.Count; i++) { if (childList[i] != item) { UIMenuPanel panel_bother = FindMenuPanel(childList[i]); if (panel_bother != null) { if (panel_bother.isShow) { Hide_ChildPanel(childList[i]); panel_bother.Hide(); } } } } }
private void Hide_ChildPanel(UIMenuListItem item) { List <UIMenuListItem> childList = GetChildItems(item); for (int i = 0; i < childList.Count; i++) { if (childList[i].IsHaveChild) { UIMenuPanel panel_child = FindMenuPanel(childList[i]); if (panel_child != null) { if (panel_child.isShow) { if (childList[i].IsHaveChild) { Hide_ChildPanel(childList[i]); } panel_child.Hide(); } } } } }
public void Hide() { Hide_ChildPanel(null); rootPanel.Hide(); IsShow = false; }