Beispiel #1
0
    private void InitView(UIData view, Intent intent = null)
    {
        if (view == null)
        {
            return;
        }
        UIViewBase baseView = view.gameObject.GetComponent <UIViewBase>();
        UIPanel    panel    = view.gameObject.GetComponent <UIPanel>();

        if (panel == null)
        {
            Debugger.Error(view.name + " need UIViewBase or UIPanel!");
            return;
        }
        AutoDepth();
        if (baseView != null)
        {
            baseView.OnInit();
        }
        if (view.viewStyle == UIViewStyle.Tips)
        {
            panel.depth = m_basePageDepth + Config.ViewLevelDepth;
        }
        view.gameObject.SetActive(true);
        if (baseView != null)
        {
            baseView.OnOpen(intent);
        }
    }