示例#1
0
 private void SetButton(GamePadDPad.DPadButtons button, bool value)
 {
     if (value)
     {
         this.buttons |= button;
         return;
     }
     this.buttons &= ~button;
 }
示例#2
0
        public void notifyButtonClick(DPadButtons button)
        {
            Button = button;

            if (ButtonClick != null)
            {
                ButtonClick(this, new DPadButtonEventArgs(button));
            }
        }
示例#3
0
 void SetButton(DPadButtons button, bool value)
 {
     if (value)
     {
         buttons |= button;
     }
     else
     {
         buttons &= ~button;
     }
 }
示例#4
0
 internal GamePadDPad(Buttons state)
 {
     // DPad butons are stored in the lower 4bits
     // of the Buttons enumeration.
     buttons = (DPadButtons)((int)state & 0x0f);
 }
示例#5
0
 //
 // Constructors
 //
 internal GamePadDPad(Buttons state)
 {
     this.buttons = (GamePadDPad.DPadButtons)(state & (Buttons.DPadUp | Buttons.DPadDown | Buttons.DPadLeft | Buttons.DPadRight));
 }
示例#6
0
 public DPadButtonEventArgs(DPadButtons button)
 {
     Button = button;
 }