Ejemplo n.º 1
0
        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();
            }
        }
Ejemplo n.º 2
0
        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();
            }
        }
Ejemplo n.º 3
0
        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();
            }
        }