public void ChangeSelection(int selectIndex)
 {
     if (buttons.Length > selectIndex)
     {
         UITabButton button = buttons[selectIndex];
         OnClickButtonToSelect(button.gameObject);
     }
 }
    public void Subscribe(UITabButton <T> button)
    {
        if (tabButtons == null)
        {
            tabButtons = new List <UITabButton <T> >();
        }

        tabButtons.Add(button);
    }
Esempio n. 3
0
    private void DeactivateOthers(UITabButton curButton)
    {
        for (int i = 0; i < tabButtons.Count; i++)
        {
            if (tabButtons[i] == curButton || !tabButtons[i].IsActivated)
            {
                continue;
            }

            tabButtons [i].Activate(false);
        }
    }
    void OnClickButtonToSelect(GameObject go)
    {
        UITabButton button = go.GetComponent <UITabButton>();

        foreach (UITabButton btn in buttons)
        {
            if (btn == button)
            {
                btn.GodSelectMe();
            }
            else
            {
                btn.GodIgnoreMe();
            }
        }
        int index = ButtonsList.IndexOf(button);

        if (null != OnSelection)
        {
            OnSelection(index);
        }
    }
 public void OnTabSelected(UITabButton <T> button, PointerEventData eventData)
 {
 }
 public void OnTabExit(UITabButton <T> button, PointerEventData eventData)
 {
 }