From 0c391fdbce5a079cf03e483eb6174dd47806163d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Aug 2019 21:08:47 +0800 Subject: *misc --- Source/modules/asura-core/Input/Button.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Source/modules/asura-core/Input/Button.h (limited to 'Source/modules/asura-core/Input/Button.h') diff --git a/Source/modules/asura-core/Input/Button.h b/Source/modules/asura-core/Input/Button.h new file mode 100644 index 0000000..528063d --- /dev/null +++ b/Source/modules/asura-core/Input/Button.h @@ -0,0 +1,31 @@ +#ifndef __BUTTON_H__ +#define __BUTTON_H__ + +#include + +namespace_begin(AsuraEngine) +namespace_begin(Input) + +/// keyboard button \ mouse button \ joystick button +class Button +{ +public: + inline Button(int key, bool state) : + key(key), + state(state) + { + } + + inline int GetKey(void) const { return this->key; } + inline bool GetState(void) const { return this->state; } + +private: + int key; + bool state; + +}; + +namespace_end +namespace_end + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0