public void SelectTab(CharacterFilterTab tab, bool instant) { int newIndex = Tabs.IndexOf(tab); if (newIndex == currentIndex) { return; } currentIndex = newIndex; // we have selected a new tab // remove highlights from all the other tabs: foreach (CharacterFilterTab t in Tabs) { if (t != tab) { t.Deselect(instant); } } // select the tab that we have picked tab.Select(instant); // update the cards in the collection DeckBuildingScreen.Instance.CollectionBrowserScript.Asset = tab.Asset; DeckBuildingScreen.Instance.CollectionBrowserScript.IncludeAllCharacters = tab.showAllCharacters; }
public void SelectTab(CharacterFilterTab tab, bool instant) { int newIndex = Tabs.IndexOf(tab); if (newIndex == _currentIndex) { return; } _currentIndex = newIndex; foreach (CharacterFilterTab t in Tabs) { if (t != tab) { t.Deselect(instant); } } tab.Select(instant); DeckBuildingScreen.Instance.CollectionBrowserScript.Asset = tab.Asset; DeckBuildingScreen.Instance.CollectionBrowserScript.IncludeAllCharacters = tab.ShowAllCharacters; }