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/input_device.h | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 source/modules/asura-core/input/input_device.h (limited to 'source/modules/asura-core/input/input_device.h') diff --git a/source/modules/asura-core/input/input_device.h b/source/modules/asura-core/input/input_device.h new file mode 100644 index 0000000..7082ea3 --- /dev/null +++ b/source/modules/asura-core/input/input_device.h @@ -0,0 +1,41 @@ +#ifndef __ASURA_ENGINE_INPUT_BASE_H__ +#define __ASURA_ENGINE_INPUT_BASE_H__ + +#include +#include +#include + +#include "../core_config.h" + +#include "keyboard_state.h" + +namespace AsuraEngine +{ + namespace Input + { + + /// 不同平台继承这个基类并实现handle接口 + ASURA_ABSTRACT class InputDevice : public Singleton + { + protected: + + void OnKeyDown(int key); + void OnKeyUp(int key); + + void OnMouseMove(const AEMath::Vector2f& position); + + void OnMouseButtonDown(int key); + void OnMouseButtonUp(int key); + + void OnMouseWheel(); + + void OnInputChar(); + + }; + + } +} + +namespace AEInput = AsuraEngine::Input; + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0