Beispiel #1
0
 public static void Invoke(string eventName, object value)
 {
     if (ButtonEvent.IsLock())
     {
         return;
     }
     for (int index = 0; index < ButtonEvent.m_Listener.Count; ++index)
     {
         ButtonEvent.Listener listener = ButtonEvent.m_Listener[index];
         if (listener.eventName == eventName)
         {
             listener.callback(false, value);
         }
     }
 }
Beispiel #2
0
        private void RefreshButton()
        {
            if (!this.IsFlag(ButtonEvent.Flag.AUTOLOCK) || !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.m_Selectable, (UnityEngine.Object)null))
            {
                return;
            }
            if (this.selectableType == ButtonEvent.SelectableType.TAB)
            {
                Toggle selectable = this.m_Selectable as Toggle;
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)selectable, (UnityEngine.Object)null) && selectable.get_isOn())
                {
                    this.m_Selectable.set_interactable(false);
                    return;
                }
            }
            bool flag = !ButtonEvent.IsLock();

            if (this.m_Selectable.get_interactable() == flag)
            {
                return;
            }
            this.m_Selectable.set_interactable(flag);
        }