Exemple #1
0
    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;
    }
Exemple #2
0
    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;
    }