NWengine 0.9
Loading...
Searching...
No Matches
Inputs Class Reference

The Inputs class represents the input state and provides methods to process and retrieve input. More...

#include <Inputs.h>

Static Public Member Functions

static void Process (void *window)
 Process the input events.
 
static bool GetInputKey (Input_Number key, Input_Mode mode)
 Get the state of the specified input key.
 
static bool GetInputMouse (Input_Number key, Input_Mode mode)
 Get the state of the specified mouse input.
 

Static Public Attributes

static double mousePosX
 The X-coordinate of the mouse position.
 
static double mousePosY
 The Y-coordinate of the mouse position.
 
static bool left
 Flag indicating if the left input key is pressed.
 
static bool right
 Flag indicating if the right input key is pressed.
 
static bool up
 Flag indicating if the up input key is pressed.
 
static bool down
 Flag indicating if the down input key is pressed.
 
static bool d
 Flag indicating if the d input key is pressed.
 
static bool r
 Flag indicating if the r input key is pressed.
 
static bool s
 Flag indicating if the s input key is pressed.
 
static bool t
 Flag indicating if the t input key is pressed.
 
static bool ctrl
 Flag indicating if the control input key is pressed.
 
static bool left_ctrl
 Flag indicating if the left control input key is pressed.
 
static bool right_ctrl
 Flag indicating if the right control input key is pressed.
 
static bool left_click
 Flag indicating if the left mouse button is clicked.
 
static bool n_0
 Flag indicating if the 0 input key is pressed.
 
static bool n_1
 Flag indicating if the 1 input key is pressed.
 
static bool n_2
 Flag indicating if the 2 input key is pressed.
 
static bool n_3
 Flag indicating if the 3 input key is pressed.
 
static bool n_4
 Flag indicating if the 4 input key is pressed.
 
static bool enter = 0
 Flag indicating if the enter input key is pressed.
 
static bool f2
 Flag indicating if the F2 input key is pressed.
 
static bool space
 Flag indicating if the space input key is pressed.
 
static bool usingJoystick
 Flag indicating if a joystick is being used.
 
static float joystickAxis [6] = {0.0f}
 The array of joystick axis values.
 

Detailed Description

The Inputs class represents the input state and provides methods to process and retrieve input.

Member Function Documentation

◆ GetInputKey()

bool Inputs::GetInputKey ( Input_Number key,
Input_Mode mode )
static

Get the state of the specified input key.

Parameters
keyThe input key number.
modeThe input mode.
Returns
True if the input key is pressed, false otherwise.

◆ GetInputMouse()

bool Inputs::GetInputMouse ( Input_Number key,
Input_Mode mode )
static

Get the state of the specified mouse input.

Parameters
keyThe input key number.
modeThe input mode.
Returns
True if the mouse input is pressed, false otherwise.

◆ Process()

void Inputs::Process ( void * window)
static

Process the input events.

Parameters
windowA pointer to the window object.

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