NWengine
0.9
Loading...
Searching...
No Matches
Inputs.h
Go to the documentation of this file.
1
6
#pragma once
7
#include "Maths.h"
8
13
#define INPUT_LEFT_X 0
14
19
#define INPUT_LEFT_Y 1
20
25
#define INPUT_RIGHT_X 3
26
31
#define INPUT_RIGHT_Y 4
32
37
typedef
int
Input_Number
;
38
43
typedef
int
Input_Mode
;
44
49
class
Inputs
{
50
public
:
54
static
double
mousePosX
;
55
59
static
double
mousePosY
;
60
64
static
bool
left
;
65
69
static
bool
right
;
70
74
static
bool
up
;
75
79
static
bool
down
;
80
84
static
bool
d
;
85
89
static
bool
r
;
90
94
static
bool
s
;
95
99
static
bool
t
;
100
104
static
bool
ctrl
;
105
109
static
bool
left_ctrl
;
110
114
static
bool
right_ctrl
;
115
119
static
bool
left_click
;
120
124
static
bool
n_0
;
125
129
static
bool
n_1
;
130
134
static
bool
n_2
;
135
139
static
bool
n_3
;
140
144
static
bool
n_4
;
145
149
static
bool
enter
;
150
154
static
bool
f2
;
155
159
static
bool
space
;
160
164
static
bool
usingJoystick
;
165
170
static
void
Process
(
void
* window);
171
178
static
bool
GetInputKey
(
Input_Number
key,
Input_Mode
mode);
179
186
static
bool
GetInputMouse
(
Input_Number
key,
Input_Mode
mode);
187
191
static
float
joystickAxis
[6];
192
};
Input_Mode
int Input_Mode
Alias for the input mode type.
Definition
Inputs.h:43
Input_Number
int Input_Number
Alias for the input number type.
Definition
Inputs.h:37
Inputs
The Inputs class represents the input state and provides methods to process and retrieve input.
Definition
Inputs.h:49
Inputs::enter
static bool enter
Flag indicating if the enter input key is pressed.
Definition
Inputs.h:149
Inputs::right_ctrl
static bool right_ctrl
Flag indicating if the right control input key is pressed.
Definition
Inputs.h:114
Inputs::n_4
static bool n_4
Flag indicating if the 4 input key is pressed.
Definition
Inputs.h:144
Inputs::ctrl
static bool ctrl
Flag indicating if the control input key is pressed.
Definition
Inputs.h:104
Inputs::Process
static void Process(void *window)
Process the input events.
Definition
Inputs.cpp:38
Inputs::left_ctrl
static bool left_ctrl
Flag indicating if the left control input key is pressed.
Definition
Inputs.h:109
Inputs::mousePosY
static double mousePosY
The Y-coordinate of the mouse position.
Definition
Inputs.h:59
Inputs::down
static bool down
Flag indicating if the down input key is pressed.
Definition
Inputs.h:79
Inputs::left_click
static bool left_click
Flag indicating if the left mouse button is clicked.
Definition
Inputs.h:119
Inputs::mousePosX
static double mousePosX
The X-coordinate of the mouse position.
Definition
Inputs.h:54
Inputs::joystickAxis
static float joystickAxis[6]
The array of joystick axis values.
Definition
Inputs.h:22
Inputs::t
static bool t
Flag indicating if the t input key is pressed.
Definition
Inputs.h:99
Inputs::usingJoystick
static bool usingJoystick
Flag indicating if a joystick is being used.
Definition
Inputs.h:164
Inputs::GetInputKey
static bool GetInputKey(Input_Number key, Input_Mode mode)
Get the state of the specified input key.
Definition
Inputs.cpp:24
Inputs::up
static bool up
Flag indicating if the up input key is pressed.
Definition
Inputs.h:74
Inputs::n_1
static bool n_1
Flag indicating if the 1 input key is pressed.
Definition
Inputs.h:129
Inputs::f2
static bool f2
Flag indicating if the F2 input key is pressed.
Definition
Inputs.h:154
Inputs::s
static bool s
Flag indicating if the s input key is pressed.
Definition
Inputs.h:94
Inputs::space
static bool space
Flag indicating if the space input key is pressed.
Definition
Inputs.h:159
Inputs::left
static bool left
Flag indicating if the left input key is pressed.
Definition
Inputs.h:64
Inputs::n_3
static bool n_3
Flag indicating if the 3 input key is pressed.
Definition
Inputs.h:139
Inputs::right
static bool right
Flag indicating if the right input key is pressed.
Definition
Inputs.h:69
Inputs::d
static bool d
Flag indicating if the d input key is pressed.
Definition
Inputs.h:84
Inputs::GetInputMouse
static bool GetInputMouse(Input_Number key, Input_Mode mode)
Get the state of the specified mouse input.
Definition
Inputs.cpp:34
Inputs::n_2
static bool n_2
Flag indicating if the 2 input key is pressed.
Definition
Inputs.h:134
Inputs::n_0
static bool n_0
Flag indicating if the 0 input key is pressed.
Definition
Inputs.h:124
Inputs::r
static bool r
Flag indicating if the r input key is pressed.
Definition
Inputs.h:89
Context
Inputs.h
Generated by
1.10.0