public override void HandleInput(InputState input) { PlayerIndex playerIndex; if (input.IsMenuSelect(ControllingPlayer, out playerIndex)) { if (Accepted != null) Accepted(this, new PlayerIndexEventArgs(playerIndex)); ExitScreen(); } else if (input.IsMenuCancel(ControllingPlayer, out playerIndex)) { if (Cancelled != null) Cancelled(this, new PlayerIndexEventArgs(playerIndex)); ExitScreen(); } GuiData.doInput(input); }
public virtual void HandleInput(InputState input) { }
public static void doInput(InputState input) { doInput(); lastInput = input; }
public override void HandleInput(InputState input) { base.HandleInput(input); GuiData.doInput(input); }
public override void HandleInput(InputState input) { base.HandleInput(input); GuiData.doInput(input); if (!Settings.debugCommandsEnabled || !Utils.keyPressed(input, Keys.F8, new PlayerIndex?())) return; ExitScreen(); Game1.getSingleton().Exit(); }
public static bool buttonPressed(InputState input, Buttons button, PlayerIndex? player) { var gamePadState1 = input.CurrentGamePadStates[(int) player.Value]; var gamePadState2 = input.LastGamePadStates[(int) player.Value]; return gamePadState1.IsButtonDown(button) && gamePadState2.IsButtonUp(button); }
public static bool keyPressed(InputState input, Keys key, PlayerIndex? player) { if (GuiData.blockingTextInput) return false; var index = 0; if (player.HasValue) index = (int) player.Value; var keyboardState1 = input.CurrentKeyboardStates[index]; var keyboardState2 = input.LastKeyboardStates[index]; return keyboardState1.IsKeyDown(key) && keyboardState2.IsKeyUp(key); }
public override void HandleInput(InputState input) { GuiData.doInput(input); if (!Utils.keyPressed(input, Keys.NumLock, ScreenManager.controllingPlayer)) return; PostProcessor.bloomEnabled = !PostProcessor.bloomEnabled; }