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