コード例 #1
0
    //private NvTutorial mTutorial;

//	private bool buildVisibleTableCallback( Transform tr, object args )
//	{
//		NvUIBase elem = tr.GetComponent<NvUIBase>();
//		if ( elem == null )
//		{
//			saveVisibleToTable( tr, tr.gameObject.active );
//		}
//		else
//		{
//			return true;
//		}
//
//		return false;
//	}

    protected override void AwakeImpl()
    {
        base.AwakeImpl();

        if (dialogOwner != null)
        {
            dialogOwner.registerNotifiactionListener(gameObject);
        }

        //enumWidgets(buildVisibleTableCallback);

        if (m_tabContexts != null && m_tabContexts.Length > 0)
        {
            m_tabPages = new NvUITabPage[m_tabContexts.Length];
            int ii = 0;
            foreach (TabContext ctx in m_tabContexts)
            {
                m_tabPages[ii] = new NvUITabPage(this);
                m_tabPages[ii].m_dialogPrefab = ctx.dialogPrefab;
                m_tabPages[ii].m_dialogDepth  = ctx.dialogDepth;
                m_tabPages[ii].m_dialogOwner  = dialogOwner;
                if (ctx.tabButton != null)
                {
                    ctx.tabButton.index         = ii;
                    ctx.tabButton.eventOnClick += OnTabClicked;
                }
                ++ii;
            }
        }

        //mTutorial = NvTutorialManager.getInstance().CurrentTutorial;
    }
コード例 #2
0
 public NvUIDialogBase createDialog(string dlgName, string dlgPrefab)
 {
     if (m_CommonLayer != null)
     {
         NvUIDialogBase dlg = m_CommonLayer.createDialog(dlgName, dlgPrefab);
         if (dlg != null)
         {
             dlg.registerNotifiactionListener(gameObject);
         }
         return(dlg);
     }
     return(null);
 }