コード例 #1
0
ファイル: VigemXboxDevice.cs プロジェクト: yy520a/XOutput
 private void SetValueIfNeeded(Xbox360Button button, bool?value)
 {
     if (value.HasValue)
     {
         var newValue = value.Value;
         controller.SetButtonState(button, newValue);
     }
 }
コード例 #2
0
        public void SetButtonState(Xbox360Button button, bool pressed)
        {
            if (pressed)
            {
                _nativeReport.wButtons |= (ushort)button.Value;
            }
            else
            {
                _nativeReport.wButtons &= (ushort)~button.Value;
            }

            if (AutoSubmitReport)
            {
                SubmitNativeReport(_nativeReport);
            }
        }
コード例 #3
0
ファイル: Game1.cs プロジェクト: shiguang1120/mini2Dx
 public bool buttonUp(Xbox360GamePad xgp, Xbox360Button xb)
 {
     Console.WriteLine("buttonUp({0}, {1})", xgp, xb);
     return(false);
 }
コード例 #4
0
ファイル: GameInput.cs プロジェクト: akur-8/UltraCyber
 public static bool GetXboxButtonUp(uint in_index, Xbox360Button in_button)
 {
     return(Input.GetKeyUp(GetXboxKeyCode(in_index, in_button)));
 }
コード例 #5
0
ファイル: GameInput.cs プロジェクト: akur-8/UltraCyber
 private static KeyCode GetXboxKeyCode(uint in_index, Xbox360Button in_button)
 {
     return(GetJoystickKey(in_index, (uint)in_button));
 }
コード例 #6
0
 public VigemXbox360ButtonMapping(Xbox360Button button)
 {
     Type = button;
 }
コード例 #7
0
 public static void SetButton(int controllerId, Xbox360Button btn, bool state)
 {
     singleton.gamepads[controllerId].SetButtonState(btn, state);
 }