Esempio n. 1
0
 public static bool Accept(bool doMouse = true, bool doKeyBoard = true, bool doGamePad = true)
 {
     if (Core.GameInstance.IsActive)
     {
         if (doKeyBoard)
         {
             if (KeyBoardHandler.KeyPressed(Core.KeyBindings.Enter1) || KeyBoardHandler.KeyPressed(Core.KeyBindings.Enter2))
             {
                 return(true);
             }
         }
         if (doMouse)
         {
             if (MouseHandler.ButtonPressed(MouseHandler.MouseButtons.LeftButton))
             {
                 return(true);
             }
         }
         if (doGamePad)
         {
             if (ControllerHandler.ButtonPressed(Buttons.A))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 2
0
 public static bool Dismiss(bool doMouse = true, bool doKeyBoard = true, bool doGamePad = true)
 {
     if (Core.GameInstance.IsActive)
     {
         if (doKeyBoard)
         {
             if (KeyBoardHandler.KeyPressed(Core.KeyBindings.Back1) || KeyBoardHandler.KeyPressed(Core.KeyBindings.Back2))
             {
                 return(true);
             }
         }
         if (doMouse)
         {
             if (MouseHandler.ButtonPressed(MouseHandler.MouseButtons.RightButton))
             {
                 return(true);
             }
         }
         if (doGamePad)
         {
             if (ControllerHandler.ButtonPressed(Buttons.B))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
Esempio n. 3
0
 public static bool Down(bool pressed, bool arrowKeys = true, bool scroll = true, bool wasd = true, bool thumbStick = true, bool dPad = true)
 {
     if (Core.GameInstance.IsActive)
     {
         if (MouseHandler.WindowContainsMouse && scroll)
         {
             if (MouseHandler.GetScrollWheelChange() < 0)
             {
                 return(true);
             }
         }
         if (pressed)
         {
             return(CheckDirectionalPress(PressDirections.Down, Core.KeyBindings.BackwardMove, Core.KeyBindings.Down, Buttons.LeftThumbstickDown, Buttons.DPadDown, arrowKeys, wasd, thumbStick, dPad));
         }
         if (wasd)
         {
             if (KeyBoardHandler.KeyDown(Core.KeyBindings.BackwardMove))
             {
                 return(true);
             }
         }
         if (arrowKeys)
         {
             if (KeyBoardHandler.KeyDown(Core.KeyBindings.Down))
             {
                 return(true);
             }
         }
         if (thumbStick)
         {
             if (ControllerHandler.ButtonDown(Buttons.LeftThumbstickDown))
             {
                 return(true);
             }
         }
         if (dPad)
         {
             if (ControllerHandler.ButtonDown(Buttons.DPadDown))
             {
                 return(true);
             }
         }
     }
     return(false);
 }