private void OpenDependPanel(int uiID, PanelInfo masterInfo, Action <AbstractPanel> listener, params object[] args) { if (masterInfo == null) { Log.e("DependPanel Can not open with null Parent."); return; } PanelInfo panelInfo = LoadPanelInfo(uiID); if (panelInfo == null) { return; } panelInfo.AddMaster(masterInfo.panelID, args); if (panelInfo.isReady) { ReSortPanel(); panelInfo.AddOpenCallback(listener); } else { panelInfo.AddOpenCallback(listener); panelInfo.LoadPanelResAsync(); } }
private void OpenPanel(int uiID, PanelType panelType, Action <AbstractPanel> listener, params object[] args) { PanelInfo panelInfo = LoadPanelInfo(uiID); if (panelInfo == null) { return; } panelInfo.sortIndex = m_UIRoot.RequireNextPanelSortingOrder(panelType); panelInfo.AddMaster(panelInfo.panelID, args); if (panelInfo.isReady) { ReSortPanel(); panelInfo.AddOpenCallback(listener); } else { panelInfo.AddOpenCallback(listener); panelInfo.LoadPanelResAsync(); } }
public void OpenPanel <T>(T uiID, PanelType panelType, Action <AbstractPanel> listener, params object[] args) where T : IConvertible { PanelInfo panelInfo = LoadPanelInfo(uiID.ToInt32(null)); if (panelInfo == null) { return; } panelInfo.sortIndex = m_UIRoot.RequireNextPanelSortingOrder(panelType); panelInfo.AddMaster(panelInfo.panelID, args); if (panelInfo.isReady) { ReSortPanel(); panelInfo.AddOpenCallback(listener); } else { panelInfo.AddOpenCallback(listener); panelInfo.LoadPanelResAsync(); } }