public void onTabEnter(tabbutton button) { ResetTabs(); if (selectedTab == null || button != selectedTab) { button.backgroundImg.sprite = tabHover; } }
public void subscribe(tabbutton button) { if (tabButtons == null) { tabButtons = new List <tabbutton>(); } tabButtons.Add(button); }
public void onTabSelected(tabbutton button) { selectedTab = button; ResetTabs(); button.backgroundImg.sprite = tabActive; int index = button.transform.GetSiblingIndex(); for (int i = 0; i < objectsToSwap.Count; i++) { if (i == index) { objectsToSwap[i].SetActive(true); } else { objectsToSwap[i].SetActive(false); } } }
public void onTabExit(tabbutton button) { ResetTabs(); }