public OpenParam(string uiName, int siblingIndex, PanelUi dialog, UiInitType initType) { Assert.IsNotNull(uiName, "UI名不能为null"); UiName = uiName; Dialog = dialog; InitType = initType; SiblingIndex = siblingIndex; }
private static void CloseUi(PanelUi panelUI, bool force = false) { if (!force && panelUI.Dialog != null) { return; } _CloseStack.Clear(); _CloseStack.Push(panelUI); var back = false; while (_CloseStack.Count != 0) { var curUi = _CloseStack.Peek(); if (back) { _CloseStack.Pop(); if (!curUi.CloseCheck()) { return; } curUi.BeforeClose(); curUi.transform.SetParent(_UIRecycleContainer); _ActiveUI.Remove(curUi); if (curUi.Stable) { _HideStableUI.Add(curUi); curUi.gameObject.SetActive(false); } else { GameObjectPool.Put(curUi); } continue; } if (DialogOpened(curUi.Dialog)) { _CloseStack.Push(curUi.Dialog); } else { back = true; } } }
public static bool DialogOpened(PanelUi dialog) { return(dialog != null && dialog.gameObject.activeSelf); }
public static bool IsUiOpened(PanelUi panelUI) { return(GetUi(panelUI.EntityName) != null); }