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); } }
public void OnTabExit(TabButton button) { ResetTabs(); }
public void Subscribe(TabButton button) { tabButtons.Add(button); }