From d8417b03b9c2a820d3d3be0dfa80841b4d1f4c04 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 9 Nov 2021 19:22:13 +0800 Subject: *misc --- Runtime/Events/InputEvent.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'Runtime/Events/InputEvent.h') diff --git a/Runtime/Events/InputEvent.h b/Runtime/Events/InputEvent.h index 6069c85..164bfff 100644 --- a/Runtime/Events/InputEvent.h +++ b/Runtime/Events/InputEvent.h @@ -30,6 +30,22 @@ enum EInputEventType InputEvent_RotateGesture = 1002 }; +enum EModifiers { + Modifier_Shift = 1 << 0, + Modifier_Control = 1 << 1, + Modifier_Alt = 1 << 2, + Modifier_Command = 1 << 3, + Modifier_Numeric = 1 << 4, + Modifier_CapsLock = 1 << 5, + Modifier_FunctionKey = 1 << 6 +}; + +enum EMouseButton { + Mouse_LeftButton = 0, + Mouse_RightButton = 1, + Mouse_MiddleButton = 2 +}; + // ÊäÈëʼþ struct InputEvent : public LuaBind::INativeTable { @@ -50,8 +66,11 @@ struct InputEvent : public LuaBind::INativeTable bool use; - InputEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + InputEvent(UINT message, WPARAM wParam, LPARAM lParam, HWND window); + + void CastToTable(LuaBind::State& state) const override; - void CastToTable(LuaBind::State& state) override; +private: + bool isMouse, isKey; }; \ No newline at end of file -- cgit v1.1-26-g67d0