// 关闭最上层的UI public bool _internal_close_top_view(E_ViewId viewId) { PanelLog.Assert(_currView != null, "当前界面为空"); if (_currView == null) { return(true); } // 正常通道的历史界面必定是Panel打开头 PanelLog.Assert(_panelHistory.Count != 1, "已经回退到最后一个历史界面"); if (_panelHistory.Count <= 1) { return(true); } if (viewId != _currView.ViewId) { return(true); } bool result = _currView.IsPanel(); // 关闭当前界面 _internal_real_close(_currView); if (result) { return(false); } return(true); }
public void OnClose(E_ViewId viewId) { bool result = _panelHistoryStack.AssetView(viewId); PanelLog.Assert(result, "回退的界面,和当前的界面历史不一致"); if (!result) { return; } _panelHistoryStack.Back(viewId); }
public bool Remove(PanelInfo viewData) { for (int i = _panelHistory.Count - 1; i >= 0; i--) { if (viewData == _panelHistory[i]) { PanelLog.Log("Remove :[{0}]", viewData.ViewId); _panelHistory.RemoveAt(i); return(true); } } return(false); }
public PanelInfo PopHistory() { PanelInfo viewData = null; if (_panelHistory.Count > 0) { viewData = _panelHistory[_panelHistory.Count - 1]; PanelLog.Log("Remove :[{0}]", viewData.ViewId); _panelHistory.RemoveAt(_panelHistory.Count - 1); } return(viewData); }
public virtual void OnDestroySelf() { PanelLog.Log("销毁界面:[{0}]", _viewId); }
public virtual void OnExit() { PanelLog.Log("退出界面:[{0}]", _viewId); }
/// <summary> /// 一些界面的相关内容的初始化,会被反复初始化 /// </summary> public virtual void OnEnter() { PanelLog.Log("进入界面:[{0}]", _viewId); }
/// <summary> /// 只执行一次 主要侧重于按钮的监听,初始化 /// </summary> public virtual void OnInit() { PanelLog.Log("初始化界面:[{0}]", _viewId); _init_id(); }
public void PushHistory(PanelInfo viewData) { PanelLog.Log("Add :[{0}]", viewData.ViewId); _panelHistory.Add(viewData); }