Esempio n. 1
0
        private void ActivateTab(SA_ClickableLabel selectedTab)
        {
            foreach (var tab in m_tabs)
            {
                tab.IsSelected = false;
            }

            selectedTab.IsSelected = true;
            m_selectedTab          = selectedTab;
        }
Esempio n. 2
0
        public void AddItem(string name)
        {
            var tab = new SA_ClickableLabel(name, m_selectedColor, m_style);

            tab.OnClick.AddListener(() => {
                ActivateTab(tab);
            });

            m_tabs.Add(tab);


            ActivateTab(m_tabs[0]);
        }
Esempio n. 3
0
 public void SetSelectedIndex(int index)
 {
     m_lastSelectedIndex = index;
     m_selectedTab       = m_tabs[index];
     ActivateTab(m_selectedTab);
 }