예제 #1
0
 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);
 }
예제 #2
0
 public virtual void HandleInput(InputState input)
 {
 }
예제 #3
0
 public static void doInput(InputState input)
 {
     doInput();
     lastInput = input;
 }
예제 #4
0
 public override void HandleInput(InputState input)
 {
     base.HandleInput(input);
     GuiData.doInput(input);
 }
예제 #5
0
 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();
 }
예제 #6
0
 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);
 }
예제 #7
0
 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);
 }
예제 #8
0
파일: OS.cs 프로젝트: strangea/OpenHacknet
 public override void HandleInput(InputState input)
 {
     GuiData.doInput(input);
     if (!Utils.keyPressed(input, Keys.NumLock, ScreenManager.controllingPlayer))
         return;
     PostProcessor.bloomEnabled = !PostProcessor.bloomEnabled;
 }
 public override void HandleInput(InputState input)
 {
     base.HandleInput(input);
     GuiData.doInput(input);
 }