-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInput.h
More file actions
36 lines (30 loc) · 721 Bytes
/
Input.h
File metadata and controls
36 lines (30 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef INPUT_H
#define INPUT_H
enum class Button {
JUMP = 1,
LEFT = 2,
RIGHT = 3,
};
enum class ClickType {
MICRO,
SOFT,
NORMAL,
HARD,
};
class Input {
private:
Button m_button{};
bool m_pressed{};
ClickType m_clickType{};
public:
Input() = delete;
explicit Input(Button button, bool pressed, ClickType clickType)
: m_button{button}, m_pressed{pressed}, m_clickType{clickType}
{
}
Button getButton() { return m_button; }
bool isPressed() { return m_pressed; }
ClickType getClickType() { return m_clickType; }
void setClickType(ClickType clickType) { m_clickType = clickType; }
};
#endif // INPUT_H