private void SetValueIfNeeded(Xbox360Button button, bool?value) { if (value.HasValue) { var newValue = value.Value; controller.SetButtonState(button, newValue); } }
public void SetButtonState(Xbox360Button button, bool pressed) { if (pressed) { _nativeReport.wButtons |= (ushort)button.Value; } else { _nativeReport.wButtons &= (ushort)~button.Value; } if (AutoSubmitReport) { SubmitNativeReport(_nativeReport); } }
public bool buttonUp(Xbox360GamePad xgp, Xbox360Button xb) { Console.WriteLine("buttonUp({0}, {1})", xgp, xb); return(false); }
public static bool GetXboxButtonUp(uint in_index, Xbox360Button in_button) { return(Input.GetKeyUp(GetXboxKeyCode(in_index, in_button))); }
private static KeyCode GetXboxKeyCode(uint in_index, Xbox360Button in_button) { return(GetJoystickKey(in_index, (uint)in_button)); }
public VigemXbox360ButtonMapping(Xbox360Button button) { Type = button; }
public static void SetButton(int controllerId, Xbox360Button btn, bool state) { singleton.gamepads[controllerId].SetButtonState(btn, state); }