public void OnHideBegin() { if (!_mIsActive) { //LogUtil.Log("UIPanel", "Panel< {0} > has already been hidden", _mPanelName); return; } //LogUtil.Log("UIPanel", "UIPanel< {0} > OnHideBegin", _mPanelName); _mIsHiding = true; _mIsActive = false; SimpleObservableList <UIPanel> activePanels = UIPanelManager.Instance.ActivePanelList; activePanels.Remove(this); if (_mOnHideBeginListener != null) { _mOnHideBeginListener.Invoke(); } if (_mOnHideBegin != null) { _mOnHideBegin.Invoke(this); //make sure run only once _mOnHideBegin = null; } OnPanelHideBegin(); }
public void OnHideCompleted() { if (!_mIsHiding) { return; } //LogUtil.Log("UIPanel", "UIPanel< {0} > OnHideCompleted", _mPanelName); _mIsHiding = false; if (_mOnHideCompletedListener != null) { _mOnHideCompletedListener(); } if (_mOnHideCompleted != null) { _mOnHideCompleted.Invoke(this); //make sure run only once _mOnHideCompleted = null; } OnPanelHideCompleted(); }
public void OnShowBegin() { if (_mIsActive) { //LogUtil.Log("UIPanel", "Panel {0} is already active", _mPanelName); return; } //LogUtil.Log("UIPanel", "UIPanel< {0} > OnShowBegin", _mPanelName); _mIsShowing = true; if (!_mUseOriginalSiblingIndex) { transform.SetAsLastSibling(); } _mIsActive = true; SimpleObservableList <UIPanel> activePanels = UIPanelManager.Instance.ActivePanelList; activePanels.Add(this); if (_mOnShowBeginListener != null) { _mOnShowBeginListener.Invoke(); } if (_mOnShowBegin != null) { _mOnShowBegin.Invoke(this); //make sure run only once _mOnShowBegin = null; } OnPanelShowBegin(); }