public virtual void Term() { if (m_parent != null) { XMsgManager.Remove(m_parent.MsgManager, MsgManager); m_parent = null; } }
//隐藏Window处理 protected void _OnHide(XUIWindow obj) { if (obj.canvas != null) { //将窗口消息器断开总消息器 XMsgManager.Remove(obj.uiManager.MsgManager, obj.MsgManager); obj.mono.HideController(); obj.uiManager.DelSort(obj); obj.uiManager.uiRoot.uiCanvasManager.RemoveClone(obj.canvas); obj.canvas = null; obj.gameObject.transform.SetParent(obj.uiManager.uiRoot.uiUnusedNode, false); obj.gameObject.SetActive(false); } }
public void SetParent(IXUIController parent) { if (m_parent == parent) { return; } if (m_parent != null) { XMsgManager.Remove(m_parent.MsgManager, MsgManager); m_parent = null; } if (parent != null) { m_parent = parent; XMsgManager.Append(m_parent.MsgManager, MsgManager); } }