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.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index ac53d9b070..7b8df35cd0 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -101,6 +101,36 @@ static int lua_ModifyMenuItem(lua_State *L)
return 1;
}
+static int lua_ShowMenuItem(lua_State *L)
+{
+ HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
+ bool isShow = (HGENMENU)lua_toboolean(L, 2);
+
+ ::Menu_ShowItem(hMenuItem, isShow);
+
+ return 0;
+}
+
+static int lua_EnableMenuItem(lua_State *L)
+{
+ HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
+ bool isShow = (HGENMENU)lua_toboolean(L, 2);
+
+ ::Menu_EnableItem(hMenuItem, isShow);
+
+ return 0;
+}
+
+static int lua_CheckMenuItem(lua_State *L)
+{
+ HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
+ bool isChecked = (HGENMENU)lua_toboolean(L, 2);
+
+ ::Menu_SetChecked(hMenuItem, isChecked);
+
+ return 0;
+}
+
static int lua_RemoveMenuItem(lua_State *L)
{
HGENMENU hMenuItem = (HGENMENU)lua_touserdata(L, 1);
@@ -117,6 +147,9 @@ static luaL_Reg genmenuApi[] =
{ "AddContactMenuItem", lua_AddContactMenuItem },
{ "AddTrayMenuItem", lua_AddTrayMenuItem },
{ "ModifyMenuItem", lua_ModifyMenuItem },
+ { "ShowMenuItem", lua_ShowMenuItem },
+ { "EnableMenuItem", lua_EnableMenuItem },
+ { "CheckMenuItem", lua_CheckMenuItem },
{ "RemoveMenuItem", lua_RemoveMenuItem },
{ NULL, NULL }