23#include <kiwano/core/Common.h>
24#include <kiwano/base/Module.h>
25#include <kiwano/platform/Keys.h>
26#include <kiwano/event/Event.h>
27#include <kiwano/macros.h>
28#include <kiwano/math/Math.h>
48 bool IsDown(KeyCode key)
const;
55 bool WasPressed(KeyCode key)
const;
62 bool WasReleased(KeyCode key)
const;
68 bool IsDown(MouseButton btn)
const;
75 bool WasPressed(MouseButton btn)
const;
82 bool WasReleased(MouseButton btn)
const;
89 float GetMouseX()
const;
96 float GetMouseY()
const;
103 Point GetMousePos()
const;
115 void UpdateKey(KeyCode key,
bool down);
117 void UpdateButton(MouseButton btn,
bool down);
119 void UpdateMousePos(
const Point& pos);
122 static const int KEY_NUM = int(KeyCode::Last);
123 static const int BUTTON_NUM = int(MouseButton::Last);
125 bool want_update_keys_;
126 bool want_update_buttons_;
129 enum KeyIndex :
size_t
135 std::array<bool, BUTTON_NUM> buttons_[2];
136 std::array<bool, KEY_NUM> keys_[2];
时间模块上下文
Definition: Module.h:96
基础模块
Definition: Module.h:111
Definition: Singleton.h:28
更新模块上下文
Definition: Module.h:83