mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
get_mouse_pos moved to input library
This commit is contained in:
parent
94825f7b05
commit
8de986346e
2 changed files with 6 additions and 6 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "api_lua.hpp"
|
||||
#include "lua_util.hpp"
|
||||
#include "lua_commons.hpp"
|
||||
#include "LuaState.hpp"
|
||||
#include "../scripting.hpp"
|
||||
|
|
@ -39,9 +40,14 @@ static int l_add_callback(lua_State* L) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int l_get_mouse_pos(lua_State* L) {
|
||||
return lua::pushvec2_arr(L, Events::cursor);
|
||||
}
|
||||
|
||||
const luaL_Reg inputlib [] = {
|
||||
{"keycode", lua_wrap_errors<l_keycode>},
|
||||
{"add_callback", lua_wrap_errors<l_add_callback>},
|
||||
{"get_mouse_pos", lua_wrap_errors<l_get_mouse_pos>},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue