mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-04-08 08:23:54 +02:00
add onlyEnabled option to tpt.num_menus (probably useless)
This commit is contained in:
parent
8a0496e60a
commit
eafd8115b0
@ -1820,7 +1820,14 @@ int luatpt_menu_enabled(lua_State* l)
|
||||
|
||||
int luatpt_num_menus(lua_State* l)
|
||||
{
|
||||
lua_pushinteger(l, luacon_controller->GetNumMenus(true));
|
||||
int acount = lua_gettop(l);
|
||||
bool onlyEnabled = true;
|
||||
if (acount > 0)
|
||||
{
|
||||
luaL_checktype(l, 1, LUA_TBOOLEAN);
|
||||
onlyEnabled = lua_toboolean(l, 1);
|
||||
}
|
||||
lua_pushinteger(l, luacon_controller->GetNumMenus(onlyEnabled));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user