protected void SelectToggle(KToggle selectedToggle)
 {
     if (!((UnityEngine.Object)UnityEngine.EventSystems.EventSystem.current == (UnityEngine.Object)null) && UnityEngine.EventSystems.EventSystem.current.enabled)
     {
         if ((UnityEngine.Object)currentlySelectedToggle == (UnityEngine.Object)selectedToggle)
         {
             currentlySelectedToggle = null;
         }
         else
         {
             currentlySelectedToggle = selectedToggle;
         }
         GameObject[] array = buttonObjects;
         foreach (GameObject gameObject in array)
         {
             KToggle component = gameObject.GetComponent <KToggle>();
             if ((UnityEngine.Object)component != (UnityEngine.Object)null)
             {
                 if ((UnityEngine.Object)component == (UnityEngine.Object)currentlySelectedToggle)
                 {
                     component.Select();
                     component.isOn = true;
                 }
                 else
                 {
                     component.Deselect();
                     component.isOn = false;
                 }
             }
         }
     }
 }
    public void Activate(int itemIdx, int previouslyActiveTabIdx)
    {
        int childCount = base.transform.childCount;

        if (itemIdx < childCount)
        {
            for (int i = 0; i < childCount; i++)
            {
                Transform child = base.transform.GetChild(i);
                if (child.gameObject.activeSelf)
                {
                    KButton componentInChildren = child.GetComponentInChildren <KButton>();
                    if ((Object)componentInChildren != (Object)null)
                    {
                        Text componentInChildren2 = componentInChildren.GetComponentInChildren <Text>();
                        if ((Object)componentInChildren2 != (Object)null && i == itemIdx)
                        {
                            ActivateTabArtwork(itemIdx);
                        }
                    }
                    KToggle component = child.GetComponent <KToggle>();
                    if ((Object)component != (Object)null)
                    {
                        ActivateTabArtwork(itemIdx);
                        if (i == itemIdx)
                        {
                            component.Select();
                        }
                        else
                        {
                            component.Deselect();
                        }
                    }
                }
            }
        }
    }
Beispiel #3
0
 void OnToggleReq(KToggle tgl_, bool b_)
 {
     m_tgl_1.Select(b_);
 }
Beispiel #4
0
 void OnReqToggle(KToggle toggle_, bool isOn_)
 {
     //toggle_.isOn = isOn_;
     toggle_.Select(isOn_, false);
 }