/// <summary> /// Switches current shop tab to the one with the respective index. /// </summary> /// <param name="tabIndex">Tab index to switch to</param> private void SwitchTab(int tabIndex) { // make sure we dont go out of bounds if ((tabIndex < 0) || (tabIndex >= _setup.Categories.Length)) { return; } // hide current tab, re assign and show again _currentTab.Hide(); _currentTab = _shopTabs[tabIndex]; _currentTab.Show(); }
private void OpenShop() { _currentTab = _shopTabs[_defaultTabIndex]; _currentTab.Show(); _screen.Show(); }