Vertices Engine  v1.9.2.92
A Cross Platform game engine developed by Virtex Edge Design.
Loading...
Searching...
No Matches
VerticesEngine.Input.vxInput Class Reference

The central Input Manager Class for the Vertices Engine. This handles all types of input, from Keyboard, Mouse, GamePad touch and gesture support. More...

Classes

class  GamePadSettings
 
class  KeyboardSettings
 
class  MouseSettings
 

Static Public Member Functions

static void InitScene ()
 Input is Reinitialised at the start of each scene.
 
static void Update ()
 Reads the latest state of the keyboard and gamepad and mouse/touchpad.
 
static bool IsMenuSelect ()
 Checks for a "menu select" input action such as Space or Enter Key, A or Start buttons, Mouse Click or Touch Release.
 
static bool IsMenuPressed ()
 Checks for a "menu select" press such as Space or Enter Key, A or Start buttons, Mouse Click or Touch Release.
 
static bool IsMenuReleased ()
 Checks for a "menu select" release such as Space or Enter Key, A or Start buttons, Mouse Click or Touch Release.
 
static bool IsNewMainInputDown ()
 Cross Platform Main Input Check. Checks for New Left Click Down, New Button A Press or New Touch Pressed.
 
static bool IsMainInputDown ()
 Cross Platform Main Input Check. Checks for Left Click Down, Button A Press or Touch Pressed.
 
static bool IsNewMainInputUp ()
 Cross Platform Main Input Check Up. Checks for New Left Click Release, New Button A Release or New Touch Release.
 
static bool IsMainInputUp ()
 
static bool IsMenuUp ()
 Checks for a "menu up" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
 
static bool IsMenuDown ()
 Checks for a "menu down" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
 
static bool IsPauseGame ()
 Checks for a "pause the game" input action. The controllingPlayer parameter specifies which player to read input for. If this is null, it will accept input from any player.
 
static bool IsMenuCancel ()
 Checks for a "menu cancel" input action.
 
static bool IsNewMainNavDown ()
 
static bool IsNewMainNavUp ()
 
static bool IsNewMainNavLeft ()
 
static bool IsNewMainNavRight ()
 
static bool IsNewMainSlideLeft ()
 
static bool IsNewMainSlideRight ()
 
static void SetCursorControllerPlayer (PlayerIndex playerIndex)
 Sets which player is controlling the cursor currently. This is useful for multiplayer setup.
 
static void ResetCursorControllingPlayer ()
 Resets the controlling player index to Player One.
 
static bool IsNewButtonPressed (Buttons button)
 Returns the boolean of whether of GamePad Button has been newly Pressed. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.
 
static bool IsNewButtonPressed (Buttons button, PlayerIndex PlayerIndex)
 
static bool IsNewButtonReleased (Buttons button)
 Returns the boolean of whether of GamePad Button has been newly Released. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.
 
static bool IsNewButtonReleased (Buttons button, PlayerIndex PlayerIndex)
 
static bool IsButtonPressed (Buttons button)
 Returns the boolean of whether of GamePad Button is Pressed. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.
 
static bool IsButtonPressed (Buttons button, PlayerIndex PlayerIndex)
 
static bool IsButtonPressed (Buttons button, int PlayerIndex)
 
static bool IsButtonReleased (Buttons button)
 Returns the boolean of whether of GamePad Button is Released. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.
 
static bool IsButtonReleased (Buttons button, PlayerIndex PlayerIndex)
 
static bool IsButtonReleased (Buttons button, int PlayerIndex)
 
static bool IsNewLeftThumbstickUp ()
 
static bool IsNewLeftThumbstickDown ()
 
static bool IsNewLeftThumbstickLeft ()
 
static bool IsNewLeftThumbstickRight ()
 
static bool IsNewKeyPress (Keys key)
 Helper for checking if a key was newly pressed during this update.
 
static bool IsNewKeyRelease (Keys key)
 
static bool IsKeyDown (Keys key)
 Is the specified key currently down?
 
static bool IsMouseButtonDown ()
 
static bool IsNewMouseButtonPress (MouseButtons button)
 Helper for checking if a mouse button was newly pressed during this update.
 
static bool IsNewMouseButtonRelease (MouseButtons button)
 Checks if the requested mouse button is released.
 
static bool IsMouseButtonPressed (MouseButtons button)
 Ises the mouse button pressed.
 
static bool IsNewTouchPressed ()
 Is a New Screen Touch pressed.
 
static bool IsNewTouchReleased ()
 Is a New Screen Touch released.
 
static bool IsTouchPressed ()
 Is there at least one touch in the touch collection.
 
static bool IsTouchReleased ()
 

Static Public Attributes

static bool IsInit = false
 
static bool IsCusorInitialised = false
 Whether or not the engine is initialised enough to draw the cursor. The default is this isn't set to true until after the global LoadAssets screen is called.
 
static bool DoBoxSelect = false
 
static bool IsDragging = false
 Is the Mouse Dragging. If yes, then don't let the GUI take input.
 
static bool WrapCursor = false
 
const int NumberOfGamePads = 4
 
static List< GamePadStateGamePadStates = new List<GamePadState>()
 A collection of game pad states based off of how many players are allowed for this specific game.
 
static List< GamePadStatePreviousGamePadStates = new List<GamePadState>()
 Previous gamepad states.
 
static vxKeyBindings KeyBindings
 
static MouseState MouseState
 
static Point MouseDownPosition
 The initial mouse down position.
 
static Vector2 MouseClickPos = new Vector2()
 The mouse click position.
 
static bool EnableVirtualStick
 

Properties

static Vector2 Cursor [get, set]
 Gets or sets the cursor position.
 
static Vector2 PreviousCursor [get, set]
 
static bool IsCursorInsideViewport [get]
 Returns whether the cursor is inside the window or not.
 
static bool IsCursorVisible [get, set]
 Gets or sets a value indicating whether the custom cusor in T:VerticesEngine.Input.vxvxInput is visible.
 
static Rectangle CursorPixel [get]
 The cursors pixel. This is mainly used for GUI interesection.
 
static vxInputCursorRenderer CursorRenderer [get]
 An extensible class which Handles visual logic for drawing the cursor, and how the cursor should visually change based on input state. Inherit this class to create your own custom cursor visuals.
 
static Vector2 DragDistance [get]
 
static bool IsCursorMoved [get]
 
static bool IsCursorValid [get]
 
static Vector2 CursorScreenScale [get]
 
static InputType InputType [get]
 What is the current input type for the main player.
 
static PlayerIndex PlayerControllingCursor [get]
 The player index who is currently controlling the cursor.
 
static GamePadState GamePadState [get]
 Gets the state of the game pad for the currently conrtolling game pad.
 
static GamePadState PreviousGamePadState [get]
 Gets the state of the previous game pad state for Player One.
 
static KeyboardState KeyboardState [get]
 
static KeyboardState PreviousKeyboardState [get]
 
static MouseState PreviousMouseState [get]
 
static int ScrollWheelDelta [get]
 Gets the Change in Scroll wheel position since the last update.
 
static bool IsNewLeftMouseClick [get]
 
static TouchCollection TouchCollection [get]
 
static TouchCollection PreviousTouchCollection [get]
 
static GamePadState VirtualState [get]
 
static GamePadState PreviousVirtualState [get]
 

Detailed Description

The central Input Manager Class for the Vertices Engine. This handles all types of input, from Keyboard, Mouse, GamePad touch and gesture support.

Member Function Documentation

◆ IsButtonPressed()

static bool VerticesEngine.Input.vxInput.IsButtonPressed ( Buttons button)
static

Returns the boolean of whether of GamePad Button is Pressed. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.

Returns
true, if the button press was used, false otherwise.
Parameters
buttonButton to check if it's pressed.
PlayerIndexPlayer index.

◆ IsButtonReleased()

static bool VerticesEngine.Input.vxInput.IsButtonReleased ( Buttons button)
static

Returns the boolean of whether of GamePad Button is Released. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.

Returns
true, if the button release was used, false otherwise.
Parameters
buttonButton to check if it's released.
PlayerIndexPlayer index.

◆ IsKeyDown()

static bool VerticesEngine.Input.vxInput.IsKeyDown ( Keys key)
static

Is the specified key currently down?

Parameters
keyThe key to check
Returns
A boolean value indicating whether the specified key is down or not

◆ IsMainInputDown()

static bool VerticesEngine.Input.vxInput.IsMainInputDown ( )
static

Cross Platform Main Input Check. Checks for Left Click Down, Button A Press or Touch Pressed.

Returns
true, if main input down was ised, false otherwise.

◆ IsMouseButtonPressed()

static bool VerticesEngine.Input.vxInput.IsMouseButtonPressed ( MouseButtons button)
static

Ises the mouse button pressed.

Returns
true, if mouse button pressed was ised, false otherwise.
Parameters
buttonButton.

◆ IsNewButtonPressed()

static bool VerticesEngine.Input.vxInput.IsNewButtonPressed ( Buttons button)
static

Returns the boolean of whether of GamePad Button has been newly Pressed. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.

Returns
true, if new button release was used, false otherwise.
Parameters
buttonButton to check if it's newly been pressed.
PlayerIndexPlayer index.

◆ IsNewButtonReleased()

static bool VerticesEngine.Input.vxInput.IsNewButtonReleased ( Buttons button)
static

Returns the boolean of whether of GamePad Button has been newly Released. The default is for Player One, but you can pass the PlayerIndex as an optional Variable.

Returns
true, if new button release was used, false otherwise.
Parameters
buttonButton to check if it's newly been pressed.
PlayerIndexPlayer index.

◆ IsNewMainInputDown()

static bool VerticesEngine.Input.vxInput.IsNewMainInputDown ( )
static

Cross Platform Main Input Check. Checks for New Left Click Down, New Button A Press or New Touch Pressed.

Returns
true, if new main input down was ised, false otherwise.

◆ IsNewMainInputUp()

static bool VerticesEngine.Input.vxInput.IsNewMainInputUp ( )
static

Cross Platform Main Input Check Up. Checks for New Left Click Release, New Button A Release or New Touch Release.

Returns
true, if new main input down was ised, false otherwise.

◆ IsNewMouseButtonRelease()

static bool VerticesEngine.Input.vxInput.IsNewMouseButtonRelease ( MouseButtons button)
static

Checks if the requested mouse button is released.

Parameters
buttonThe button.

◆ IsNewTouchPressed()

static bool VerticesEngine.Input.vxInput.IsNewTouchPressed ( )
static

Is a New Screen Touch pressed.

Returns
true, if new touch pressed was ised, false otherwise.

◆ IsNewTouchReleased()

static bool VerticesEngine.Input.vxInput.IsNewTouchReleased ( )
static

Is a New Screen Touch released.

Returns
true, if new touch released was ised, false otherwise.

◆ IsTouchPressed()

static bool VerticesEngine.Input.vxInput.IsTouchPressed ( )
static

Is there at least one touch in the touch collection.

Returns
true, if touch pressed was ised, false otherwise.

◆ SetCursorControllerPlayer()

static void VerticesEngine.Input.vxInput.SetCursorControllerPlayer ( PlayerIndex playerIndex)
static

Sets which player is controlling the cursor currently. This is useful for multiplayer setup.

Parameters
playerIndex

Property Documentation

◆ Cursor

Vector2 VerticesEngine.Input.vxInput.Cursor
staticgetset

Gets or sets the cursor position.

The cursor.

◆ GamePadState

GamePadState VerticesEngine.Input.vxInput.GamePadState
staticget

Gets the state of the game pad for the currently conrtolling game pad.

The state of the game pad.

◆ InputType

InputType VerticesEngine.Input.vxInput.InputType
staticget

What is the current input type for the main player.

On Desktop this is controlled by whether a key press or mouse movement is detected. When a Controller button is pressed then the input type will automatically switch over to controller.

On Mobile this will default to InputType.TouchScreen, which will hide the cursor from view for mobile.

◆ IsCursorVisible

bool VerticesEngine.Input.vxInput.IsCursorVisible
staticgetset

Gets or sets a value indicating whether the custom cusor in T:VerticesEngine.Input.vxvxInput is visible.

true if is cusor visible; otherwise, false.

◆ PreviousGamePadState

GamePadState VerticesEngine.Input.vxInput.PreviousGamePadState
staticget

Gets the state of the previous game pad state for Player One.

The state of the previous game pad.


The documentation for this class was generated from the following files: