aboutsummaryrefslogtreecommitdiff
path: root/src/lua/mouse/luaopen_mouse.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-05-17 19:10:57 +0800
committerchai <chaifix@163.com>2018-05-17 19:10:57 +0800
commit70cdd89e887641b7423e5d4d05928d14ee014aba (patch)
tree248b87ae35197a9e5941e65ef20eea359e87a5ed /src/lua/mouse/luaopen_mouse.cpp
parentdf4b054b8e8d00f7817daaa4cbf6961712cd0b75 (diff)
change file tree
Diffstat (limited to 'src/lua/mouse/luaopen_mouse.cpp')
-rw-r--r--src/lua/mouse/luaopen_mouse.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/lua/mouse/luaopen_mouse.cpp b/src/lua/mouse/luaopen_mouse.cpp
deleted file mode 100644
index da80383..0000000
--- a/src/lua/mouse/luaopen_mouse.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "libs/luax/luax.h"
-#include "SDL2/SDL.h"
-namespace jin
-{
-namespace lua
-{
- static int l_pos(lua_State* L)
- {
- int x, y;
- SDL_GetMouseState(&x, &y);
- luax_pushnumber(L, x);
- luax_pushnumber(L, y);
- return 2;
- }
-
- static const luaL_Reg f[] = {
- {"position", l_pos},
- {0, 0}
- };
-
- int luaopen_mouse(lua_State* L)
- {
- luax_newlib(L, f);
- return 1;
- }
-}
-} \ No newline at end of file