- [NEW] mouse.discard()

This commit is contained in:
2025-06-20 13:49:59 +02:00
parent f154e1a36b
commit 7bff57c6fa
4 changed files with 20 additions and 1 deletions

View File

@@ -777,6 +777,11 @@ extern "C" {
return 1;
}
static int cpp_mouse_discard(lua_State *L) {
mdiscard();
return 0;
}
// key
// ===============================================
@@ -949,6 +954,7 @@ void push_lua_funcs() {
lua_pushcfunction(L,cpp_mouse_wheel); lua_setfield(L, -2, "wheel");
lua_pushcfunction(L,cpp_mouse_down); lua_setfield(L, -2, "down");
lua_pushcfunction(L,cpp_mouse_press); lua_setfield(L, -2, "press");
lua_pushcfunction(L,cpp_mouse_discard); lua_setfield(L, -2, "discard");
lua_pushinteger(L, 1); lua_setfield(L, -2, "LEFT");
lua_pushinteger(L, 2); lua_setfield(L, -2, "MIDDLE");