- [NEW] mbtnp() added

This commit is contained in:
2023-01-27 19:50:49 +01:00
parent 5e4f0559c4
commit c335edee57
4 changed files with 19 additions and 1 deletions

View File

@@ -496,6 +496,12 @@ extern "C" {
return 1;
}
static int cpp_mbtnp(lua_State *L) {
uint8_t i = luaL_checkinteger(L, 1);
lua_pushboolean(L, mbtnp(i));
return 1;
}
static int cpp_time(lua_State *L) {
lua_pushnumber(L, time());
return 1;
@@ -833,6 +839,7 @@ void push_lua_funcs() {
lua_pushcfunction(L,cpp_mousey); lua_setglobal(L, "mousey");
lua_pushcfunction(L,cpp_mwheel); lua_setglobal(L, "mwheel");
lua_pushcfunction(L,cpp_mbtn); lua_setglobal(L, "mbtn");
lua_pushcfunction(L,cpp_mbtnp); lua_setglobal(L, "mbtnp");
lua_pushcfunction(L,cpp_time); lua_setglobal(L, "time");
lua_pushcfunction(L,cpp_abs); lua_setglobal(L, "abs");