Example #1
0
        public void OnTabSelected(TabButton button)
        {
            if (selectedTab != null)
            {
                selectedTab.Deselect();
            }

            selectedTab = button;
            selectedTab.Select();

            ResetTabs();
            button.background.sprite = tabActive;
            int index = button.transform.GetSiblingIndex();

            for (int i = 0; i < tabAreas.Count; i++)
            {
                tabAreas[i].SetActive(i == index);
            }
        }
Example #2
0
 public void OnTabExit(TabButton button)
 {
     ResetTabs();
 }
Example #3
0
 public void Subscribe(TabButton button)
 {
     tabButtons.Add(button);
 }