mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-21 08:55:21 +01:00
Move keybinding settings to (Lua-based) setting menu (#15791)
This commit is contained in:
@@ -35,11 +35,21 @@ int ModApiMenuCommon::l_irrlicht_device_supports_touch(lua_State *L)
|
||||
}
|
||||
|
||||
|
||||
int ModApiMenuCommon::l_are_keycodes_equal(lua_State *L)
|
||||
{
|
||||
auto k1 = luaL_checkstring(L, 1);
|
||||
auto k2 = luaL_checkstring(L, 2);
|
||||
lua_pushboolean(L, KeyPress(k1) == KeyPress(k2));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void ModApiMenuCommon::Initialize(lua_State *L, int top)
|
||||
{
|
||||
API_FCT(gettext);
|
||||
API_FCT(get_active_driver);
|
||||
API_FCT(irrlicht_device_supports_touch);
|
||||
API_FCT(are_keycodes_equal);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user