summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_genmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_genmenu.cpp')
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index 21e1533f2a..543fefe022 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -90,6 +90,20 @@ static int genmenu_ModifyMenuItem(lua_State *L)
return 1;
}
+static int genmenu_ConfigureMenuItem(lua_State *L)
+{
+ luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
+ HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
+ int option = luaL_checkinteger(L, 2);
+ luaL_checktype(L, 3, LUA_TLIGHTUSERDATA);
+ INT_PTR value = (INT_PTR)lua_touserdata(L, 3);
+
+ int res = Menu_ConfigureItem(hMenuItem, option, value);
+ lua_pushinteger(L, res);
+
+ return 1;
+}
+
static int genmenu_ShowMenuItem(lua_State *L)
{
luaL_checktype(L, 1, LUA_TLIGHTUSERDATA);
@@ -139,6 +153,7 @@ static luaL_Reg genmenuApi[] =
//{ "CreateRoot", genmenu_CreateRoot },
//{ "AddMenuItem", genmenu_AddMenuItem },
{ "ModifyMenuItem", genmenu_ModifyMenuItem },
+ { "ConfigureMenuItem", genmenu_ConfigureMenuItem },
{ "ShowMenuItem", genmenu_ShowMenuItem },
{ "EnableMenuItem", genmenu_EnableMenuItem },
{ "CheckMenuItem", genmenu_CheckMenuItem },