From ecd7883521cbde02f4f1a6b23a7b3b601c32dbef Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 29 Jul 2019 09:06:09 +0800 Subject: *misc --- source/modules/asura-core/input/button.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..0df8ed2 --- /dev/null +++ b/source/modules/asura-core/input/button.h @@ -0,0 +1,32 @@ +#ifndef __BUTTON_H__ +#define __BUTTON_H__ + +namespace AsuraEngine +{ + namespace 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; + + }; + + } +} + + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0