Esempio n. 1
0
 public void AddUI(BobJoyUINavigator ui)
 {
     if (!m_list.Contains(ui))
     {
         m_list.Add(ui);
     }
 }
Esempio n. 2
0
        public static BobJoyUINavigator FindOrAddUINav(GameObject go)
        {
            BobJoyUINavigator uinav = go.GetComponent <BobJoyUINavigator>();

            if (uinav == null)
            {
                uinav = go.AddComponent <BobJoyUINavigator>();
            }
            return(uinav);
        }
Esempio n. 3
0
    void RefreshJoyGUI()
    {
        m_JoyUINav = Engine.JoyUI.BobJoyUINavigator.FindOrAddUINav(gameObject);

        GameObject btnOK    = JoyControllerLogic.FindChild(transform, "BtnOk").gameObject;
        GameObject btnother = JoyControllerLogic.FindChild(transform, "BtnServerOther").gameObject;

        m_uiItems.Add(btnOK);
        m_uiItems.Add(btnother);

        for (int i = 0; i < m_uiItems.Count; i++)
        {
            m_JoyUINav.AddItem(m_uiItems[i].AddComponent <BobJoyUIItem>());
        }
    }
Esempio n. 4
0
 public void SetCurrent(BobJoyUINavigator ui)
 {
     if (ui == null)
     {
         for (int i = 0; i < m_list.Count; ++i)
         {
             BobJoyUINavigator _item = m_list[i];
             if (!_item.gameObject.activeInHierarchy)
             {
                 continue;
             }
             m_current = _item;
             return;
         }
     }
     m_current = ui;
 }
Esempio n. 5
0
    void RefreshJoyGUI()
    {
        GetComponentInChildren <UITopGrid>().enabled = false;
        for (int i = 0; i < m_pageList.Count; ++i)
        {
            m_uiItems.Add(m_pageList[i]);
        }

        for (int i = 0; i < m_itemList.Count; ++i)
        {
            m_uiItems.Add(JoyControllerLogic.FindChild(m_itemList[i].transform, "Normal").parent.gameObject);
        }
        m_btnNext = JoyControllerLogic.FindChild(transform, "BtnNext").gameObject;
        m_btnBack = JoyControllerLogic.FindChild(transform, "BtnBack").gameObject;
        m_uiItems.Add(m_btnNext);
        m_uiItems.Add(m_btnBack);


        m_JoyUINav = Engine.JoyUI.BobJoyUINavigator.FindOrAddUINav(gameObject);
        for (int i = 0; i < m_uiItems.Count; i++)
        {
            m_JoyUINav.AddItem(m_uiItems[i].AddComponent <BobJoyUIItem>());
        }
    }
Esempio n. 6
0
 public void RemoveUI(BobJoyUINavigator ui)
 {
     m_list.Remove(ui);
 }
Esempio n. 7
0
 public void SetUINav(BobJoyUINavigator ui)
 {
     m_Nav = ui;
 }