Exemple #1
0
        public void OnTabClick(TabButton tabButton)
        {
            if (tabButton.buttonState == TabButtonState.Selected)
            {
                return;
            }

            DeactivateActiveTab();

            tabButton.buttonState = TabButtonState.Selected;
            tabButton.Select();
            _tabWindows[_tabButtons.IndexOf(tabButton)].SetActive(true);

            PresentTab(tabButton);
        }
        public void Present(TabButton button, GameObject window)
        {
            switch (button.buttonState)
            {
            case TabButtonState.Idle:
                PresentIdle(button, window);
                break;

            case TabButtonState.Hover:
                PresentHover(button, window);
                break;

            case TabButtonState.Selected:
                PresentSelected(button, window);
                break;
            }
        }
 protected abstract void PresentSelected(TabButton button, GameObject window);
 protected abstract void PresentHover(TabButton button, GameObject window);
 protected override void PresentSelected(TabButton button, GameObject window)
 {
     button.backgroundImage.sprite = _spriteSelect;
 }