Esempio n. 1
0
 public PointerInputModule.ButtonState GetButtonState(PointerEventData.InputButton button)
 {
     PointerInputModule.ButtonState item = null;
     for (int i = 0; i < this.m_TrackedButtons.Count; i++)
     {
         if (this.m_TrackedButtons[i].button == button)
         {
             item = this.m_TrackedButtons[i];
             break;
         }
     }
     if (item == null)
     {
         item = new PointerInputModule.ButtonState {
             button    = button,
             eventData = new PointerInputModule.MouseButtonEventData()
         };
         this.m_TrackedButtons.Add(item);
     }
     return(item);
 }
Esempio n. 2
0
 public PointerInputModule.ButtonState GetButtonState(PointerEventData.InputButton button)
 {
     PointerInputModule.ButtonState buttonState = (PointerInputModule.ButtonState)null;
     for (int index = 0; index < this.m_TrackedButtons.Count; ++index)
     {
         if (this.m_TrackedButtons[index].button == button)
         {
             buttonState = this.m_TrackedButtons[index];
             break;
         }
     }
     if (buttonState == null)
     {
         buttonState = new PointerInputModule.ButtonState()
         {
             button    = button,
             eventData = new PointerInputModule.MouseButtonEventData()
         };
         this.m_TrackedButtons.Add(buttonState);
     }
     return(buttonState);
 }
 public PointerInputModule.ButtonState GetButtonState(PointerEventData.InputButton button)
 {
   PointerInputModule.ButtonState buttonState = (PointerInputModule.ButtonState) null;
   for (int index = 0; index < this.m_TrackedButtons.Count; ++index)
   {
     if (this.m_TrackedButtons[index].button == button)
     {
       buttonState = this.m_TrackedButtons[index];
       break;
     }
   }
   if (buttonState == null)
   {
     buttonState = new PointerInputModule.ButtonState()
     {
       button = button,
       eventData = new PointerInputModule.MouseButtonEventData()
     };
     this.m_TrackedButtons.Add(buttonState);
   }
   return buttonState;
 }
Esempio n. 4
0
 public PointerInputModule.ButtonState GetButtonState(PointerEventData.InputButton button)
 {
     PointerInputModule.ButtonState item = null;
     for (int i = 0; i < this.m_TrackedButtons.Count; i++)
     {
         if (this.m_TrackedButtons[i].button == button)
         {
             item = this.m_TrackedButtons[i];
             break;
         }
     }
     if (item == null)
     {
         item = new PointerInputModule.ButtonState {
             button = button,
             eventData = new PointerInputModule.MouseButtonEventData()
         };
         this.m_TrackedButtons.Add(item);
     }
     return item;
 }
Esempio n. 5
0
 public void SetButtonState(PointerEventData.InputButton button, PointerEventData.FramePressState stateForMouseButton, PointerEventData data)
 {
     PointerInputModule.ButtonState buttonState = this.GetButtonState(button);
     buttonState.eventData.buttonState = stateForMouseButton;
     buttonState.eventData.buttonData  = data;
 }