diff options
author | chai <chaifix@163.com> | 2019-08-04 17:19:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-04 17:19:51 +0800 |
commit | 7638df1ed1f0f314d78bd42e0aba084ba14ade0a (patch) | |
tree | d27bfdebae13e750307520232d5e003a140518a6 /source/modules/asura-core/Input/InputDevice.h | |
parent | bad78945ceba425f6a80e3b8dca2414d592970eb (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/Input/InputDevice.h')
-rw-r--r-- | source/modules/asura-core/Input/InputDevice.h | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/modules/asura-core/Input/InputDevice.h b/source/modules/asura-core/Input/InputDevice.h index 39f3d37..0ecce99 100644 --- a/source/modules/asura-core/Input/InputDevice.h +++ b/source/modules/asura-core/Input/InputDevice.h @@ -8,29 +8,35 @@ #include "../CoreConfig.h" #include "KeyboardState.h" +#include "MouseState.h" +#include "JoystickState.h" namespace_begin(AsuraEngine) namespace_begin(Input) -/// ͬƽ̨̳ಢʵhandleӿ -ASURA_ABSTRACT class InputDevice : public Singleton<InputDevice> +class InputDevice { -protected: +public: - void OnKeyDown(int key); - void OnKeyUp(int key); + InputDevice(); + virtual ~InputDevice(); - void OnMouseMove(const AEMath::Vector2f& position); +protected: - void OnMouseButtonDown(int key); - void OnMouseButtonUp(int key); + virtual bool UpdateState(); - void OnMouseWheel(); + MouseState m_Mouse; + KeyboardState m_Keyboard; + JoystickState m_Joysticks; - void OnInputChar(); +private: + + bool UpdateMousePosition(); }; +//bool ConvertPositionToClientAreaCoord(); + namespace_end namespace_end |