void Manager_OnButtonPress(input.GamePadState obj) { if (input.Buttons.RightShoulder.Down()) { if (input.Buttons.LeftShoulder.Down()) { if (input.Buttons.Y.Pressed()) { SendKeys.Send("{F5}"); SendKeys.Flush(); } if (input.Buttons.B.Pressed()) { Semantics.EndApplication.Do(); } } else { if (input.Buttons.B.Pressed()) Functions.StartAltTab(); if (input.Buttons.Y.Pressed()) Functions.StartAltShiftTab(); if (input.Buttons.A.Pressed()) Mouse.MouseLeftClick(); if (input.Buttons.X.Pressed()) Mouse.MouseRightClick(); } } }
public KeyboardState(XnaInput.KeyboardState xnaKeyboardState) : this() { for (int i = 0; i < NumKeys; ++i) { m_keyPressed[i] = xnaKeyboardState[(XnaInput.Keys)i] == XnaInput.KeyState.Down; } }
public ResolutionController() { var res = new[] { new Size(600, 320), new Size(1024, 600), new Size(1280, 720), new Size(1680, 1050), new Size(1920, 1080) }; _resolutions = new Suite<Size>(res); _resolutions.Changed += SetResolution; Add(new KeyBinding(Keys.F2, _resolutions.Previous)); Add(new KeyBinding(Keys.F3, _resolutions.Next)); }
void Manager_OnRightJoystickMove(input.GamePadState state) { if (input.Buttons.RightShoulder.Down()) { var v = state.ThumbSticks.Right * 10; if (v.X > 0 && v.X < 1) v.X = 1; if (v.X < 0 && v.X > -1) v.X = -1; if (v.Y > 0 && v.Y < 1) v.Y = 1; if (v.Y < 0 && v.Y > -1) v.Y = -1; WindowFunctions.ShiftWindow((int)v.X, -(int)v.Y, 0, 0); } }
void Manager_OnButtonRelease(input.GamePadState obj) { if (input.Buttons.RightShoulder.Released()) { Functions.EndCtrlTab(); } }