示例#1
0
    public void OnTabSelected(CustomTabButton _Button)
    {
        if (m_SelectedTab != null)
        {
            m_SelectedTab.DeSelect();
            m_SelectedTab.Img_BG.sprite = Spr_TabIdle;
        }

        m_SelectedTab = _Button;

        m_SelectedTab.Select();

        ResetTabs();
        _Button.Img_BG.sprite = Spr_TabActive;
        int index = _Button.transform.GetSiblingIndex();

        for (int i = 0; i < Obj_ToSwap.Count; i++)
        {
            if (i == index)
            {
                Obj_ToSwap[i].gameObject.SetActive(true);
            }
            else
            {
                Obj_ToSwap[i].gameObject.SetActive(false);
            }
        }
    }
示例#2
0
 public void OnTabEnter(CustomTabButton _Button)
 {
     ResetTabs();
     if (m_SelectedTab == null || _Button != m_SelectedTab)
     {
         _Button.Img_BG.sprite = Spr_TabHober;
     }
 }
示例#3
0
    public void Subscribe(CustomTabButton _Button)
    {
        if (m_TabButtons == null)
        {
            m_TabButtons = new List <CustomTabButton>();
        }

        m_TabButtons.Add(_Button);
    }
        public static void DeselectTab(CustomTabButton tabButton)
        {
            Color normalColor   = (Color)Application.Current.Resources[NormalColorString];
            Color selectedColor = (Color)Application.Current.Resources[SelectedColorString];

            tabButton.Color       = normalColor;
            tabButton.BorderColor = normalColor;
            tabButton.LabelColor  = selectedColor;
        }
示例#5
0
 public void OnTabExit(CustomTabButton _Button)
 {
     ResetTabs();
 }