From 13f477664c07826c92eac774f0035994c460c057 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 8 Nov 2021 11:32:32 +0800 Subject: *misc --- Runtime/Events/InputEvent.cpp | 9 ++++++++- Runtime/Events/InputEvent.h | 3 +++ Runtime/Events/KeyCode.h | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 Runtime/Events/KeyCode.h (limited to 'Runtime/Events') diff --git a/Runtime/Events/InputEvent.cpp b/Runtime/Events/InputEvent.cpp index ac41c94..e062bc2 100644 --- a/Runtime/Events/InputEvent.cpp +++ b/Runtime/Events/InputEvent.cpp @@ -1,12 +1,19 @@ #include "InputEvent.h" +InputEvent::InputEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + +} + void InputEvent::CastToTable(LuaBind::State& state) { lua_newtable(state); int table = state.GetTop(); + // "type" lua_pushnumber(state, type); lua_setfield(state, table, "type"); + // "mousePosition" -} +} \ No newline at end of file diff --git a/Runtime/Events/InputEvent.h b/Runtime/Events/InputEvent.h index 5a5ed36..6069c85 100644 --- a/Runtime/Events/InputEvent.h +++ b/Runtime/Events/InputEvent.h @@ -1,5 +1,6 @@ #pragma once +#include #include "Runtime/Lua/LuaHelper.h" #include "Runtime/Math/Math.h" @@ -49,6 +50,8 @@ struct InputEvent : public LuaBind::INativeTable bool use; + InputEvent(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + void CastToTable(LuaBind::State& state) override; }; \ No newline at end of file diff --git a/Runtime/Events/KeyCode.h b/Runtime/Events/KeyCode.h new file mode 100644 index 0000000..96786d7 --- /dev/null +++ b/Runtime/Events/KeyCode.h @@ -0,0 +1,3 @@ +#pragma once + + -- cgit v1.1-26-g67d0