The Table Engine
input.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
component.h
"
4
20
class
Input
:
public
Component
{
21
public
:
22
bool
spacePressed
=
false
;
23
24
bool
leftPressed
=
false
;
25
bool
rightPressed
=
false
;
26
bool
upPressed
=
false
;
27
bool
downPressed
=
false
;
28
29
int
m_mouseX
,
m_mouseY
;
30
31
bool
mouseLeftPressed
=
false
;
32
bool
mouseRightPressed
=
false
;
33
bool
mouseMiddlePressed
=
false
;
34
38
Input
();
39
43
~Input
();
44
50
void
update
()
override
;
51
};
Component
Base class for all game components, providing basic component functionalities.
Definition:
component.h:25
Input
Component for handling and storing the state of input devices.
Definition:
input.h:20
Input::mouseLeftPressed
bool mouseLeftPressed
True if the left mouse button is pressed, false otherwise.
Definition:
input.h:31
Input::m_mouseY
int m_mouseY
Current position of the mouse cursor.
Definition:
input.h:29
Input::upPressed
bool upPressed
True if the up arrow key is pressed, false otherwise.
Definition:
input.h:26
Input::mouseRightPressed
bool mouseRightPressed
True if the right mouse button is pressed, false otherwise.
Definition:
input.h:32
Input::update
void update() override
Updates the state of the input based on the latest user interactions.
Definition:
input.cpp:17
Input::spacePressed
bool spacePressed
True if the space bar is pressed, false otherwise.
Definition:
input.h:22
Input::mouseMiddlePressed
bool mouseMiddlePressed
True if the middle mouse button is pressed, false otherwise.
Definition:
input.h:33
Input::rightPressed
bool rightPressed
True if the right arrow key is pressed, false otherwise.
Definition:
input.h:25
Input::leftPressed
bool leftPressed
True if the left arrow key is pressed, false otherwise.
Definition:
input.h:24
Input::downPressed
bool downPressed
True if the down arrow key is pressed, false otherwise.
Definition:
input.h:27
Input::Input
Input()
Constructor for the Input component.
Definition:
input.cpp:6
Input::~Input
~Input()
Destructor for the Input component.
Definition:
input.cpp:13
Input::m_mouseX
int m_mouseX
Definition:
input.h:29
component.h
Defines the Component base class for all components in the game engine.
Engine
include
input.h
Generated by
1.9.1