summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/Input/Button.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-02 20:51:00 +0800
committerchai <chaifix@163.com>2019-08-02 20:51:00 +0800
commitbad78945ceba425f6a80e3b8dca2414d592970eb (patch)
tree8bf7540766349c534bf9e5746b24fd7507ba034e /source/modules/asura-core/Input/Button.h
parent99b90496765df21c5f377f42b9ed073ccb34c1fd (diff)
*修改文件名格式
Diffstat (limited to 'source/modules/asura-core/Input/Button.h')
-rw-r--r--source/modules/asura-core/Input/Button.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/modules/asura-core/Input/Button.h b/source/modules/asura-core/Input/Button.h
new file mode 100644
index 0000000..5c3c0de
--- /dev/null
+++ b/source/modules/asura-core/Input/Button.h
@@ -0,0 +1,31 @@
+#ifndef __BUTTON_H__
+#define __BUTTON_H__
+
+#include <asura-utils/Classes.h>
+
+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