コード例 #1
0
    //弹出一个指定的窗口
    public void Popup(UIViewBase view)
    {
        if (view == null)
        {
            return;
        }

        bool error = true;

        for (int i = views.Count - 1; i >= 0; i--)
        {
            if (views[i].GetInstanceID() == view.GetInstanceID())
            {
                views.RemoveAt(i);
                PopupSingleView(view);
                error = false;
                break;
            }
        }

        if (error)
        {
            Debug.LogError($"弹出失败,{ViewLayer}中没有{view.Config.viewName}");
            return;
        }

        RefreshTopOrder();
    }
コード例 #2
0
    public void Popup(UIViewBase view)
    {
        if (view == null)
        {
            return;
        }

        bool error = true;

        for (int i = views.Count - 1; i >= 0; i--)
        {
            if (views[i].GetInstanceID() == view.GetInstanceID())
            {
                views.RemoveAt(i);
                PopupSingleView(view);
                error = false;
                break;
            }
        }

        if (error)
        {
            return;
        }

        RefreshTopOrder();
    }