blob: 96d22e7022445d13e3bf9d5b85c32aa500782027 (
plain)
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
37
|
#ifndef __KEYBOARD_STATE_H__
#define __KEYBOARD_STATE_H__
#include <vector>
#include "Button.h"
namespace_begin(AsuraEngine)
namespace_begin(Input)
typedef std::vector<Button> Buttons;
class KeyboardState
{
private:
Buttons buttons;
public:
inline KeyboardState(void)
{
this->buttons.reserve(256);
}
inline const Buttons &GetButtons(void) const { return this->buttons; }
inline void AddButton(int key, bool state) { this->buttons.push_back(Button(key, state)); }
void Reset(bool full)
{
this->buttons.clear();
}
};
namespace_end
namespace_end
#endif
|