Пример #1
0
 public void TriggerOnCheckedChanged(UIToggleButton toggleButton, bool isChecked)
 {
     if (OnCheckedChanged != null)
     {
         OnCheckedChanged(toggleButton, isChecked);
     }
 }
Пример #2
0
        public void UnregisterToggleButtonInGroup(string groupName, UIToggleButton toggleButton)
        {
            HashSet <UIToggleButton> toggleButtonsInGroup;

            if (mToggleButtonGroups.TryGetValue(groupName, out toggleButtonsInGroup))
            {
                toggleButtonsInGroup.Remove(toggleButton);
            }
            else
            {
                Debug.LogWarning("Toggle Button group name not found: " + groupName);
            }
        }
Пример #3
0
        public void UncheckOtherToggleButtonsInGroup(string groupName, UIToggleButton otherThan)
        {
            HashSet <UIToggleButton> toggleButtonsInGroup;

            if (mToggleButtonGroups.TryGetValue(groupName, out toggleButtonsInGroup))
            {
                foreach (UIToggleButton toggleButton in toggleButtonsInGroup)
                {
                    if (toggleButton != otherThan)
                    {
                        toggleButton.pChecked = false;
                    }
                }
            }
        }
Пример #4
0
        public void RegisterToggleButtonInGroup(string groupName, UIToggleButton toggleButton)
        {
            HashSet <UIToggleButton> toggleButtonsInGroup;

            if (mToggleButtonGroups.TryGetValue(groupName, out toggleButtonsInGroup))
            {
                toggleButtonsInGroup.Add(toggleButton);
            }
            else
            {
                toggleButtonsInGroup = new HashSet <UIToggleButton>();
                toggleButtonsInGroup.Add(toggleButton);
                mToggleButtonGroups[groupName] = toggleButtonsInGroup;
            }
        }
Пример #5
0
 protected virtual void OnCheckedChanged(UIToggleButton toggleButton, bool isChecked)
 {
 }