Exemple #1
0
    public void ShowWindow(string windowName, EventParam param, Action OnComplete)
    {
        UIBaseWindow window = LoadWindow(windowName);

        if (null != window)
        {
            window.ShowWindow(param, OnComplete);
        }
    }
Exemple #2
0
 /// <summary>
 /// 显示界面,方面在现实之前做其他操作
 /// </summary>
 protected virtual void RealShowWindow(UIBaseWindow baseWindow, WindowID id)
 {
     baseWindow.ShowWindow();
     shownWindows[id] = baseWindow;
     if (baseWindow.windowData.windowType == UIWindowType.Normal)
     {
         // 改变当前显示Normal窗口
         lastShownNormalWindow = curShownNormalWindow;
         curShownNormalWindow  = baseWindow;
     }
 }
Exemple #3
0
    // 直接打开窗口
    protected void ShowWindowForBack(WindowID id)
    {
        // 检测控制权限
        if (!this.IsWindowInControl(id))
        {
            Debug.Log("UIManager has no control power of " + id.ToString());
            return;
        }
        if (shownWindows.ContainsKey(id))
        {
            return;
        }

        UIBaseWindow baseWindow = GetGameWindow(id);

        baseWindow.ShowWindow();
        shownWindows[baseWindow.GetID] = baseWindow;
    }
Exemple #4
0
    private void InitRootWindowConfig()
    {
        windowsParent = Utils.FindChild(uiRoot, "Canvas/windows_parent");
        if (null == windowsParent)
        {
            Logger.LogError("find windows parent node failed!!! uiroot name = " + uiRoot.name);
        }

        UIBaseWindow[] windows = windowsParent.GetComponentsInChildren <UIBaseWindow>(true);
        for (int index = 0; index < windows.Length; ++index)
        {
            UIBaseWindow window = windows[index];

            windowDic[window.name] = window;
            windowLst.Add(window);

            if (window.IsDefaultOpen)
            {
                window.ShowWindow();
            }
        }
    }