Permalink
Browse files

add onlyEnabled option to tpt.num_menus (probably useless)

  • Loading branch information...
jacob1 committed Jul 18, 2016
1 parent 8a0496e commit eafd8115b03fa61059be74fbb321286ec1e71251
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/lua/LegacyLuaAPI.cpp
@@ -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;
}

0 comments on commit eafd811

Please sign in to comment.