summaryrefslogtreecommitdiff
path: root/plugins/MirLua/docs/examples
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/docs/examples')
-rw-r--r--plugins/MirLua/docs/examples/menus.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/MirLua/docs/examples/menus.lua b/plugins/MirLua/docs/examples/menus.lua
index ee1ca258a8..fd20f92fe1 100644
--- a/plugins/MirLua/docs/examples/menus.lua
+++ b/plugins/MirLua/docs/examples/menus.lua
@@ -41,15 +41,12 @@ local CMIF_ROOTHANDLE = 384
local hRoot = genmenu.AddMainMenuItem({ Name = "Main menu root", Flags = CMIF_ROOTHANDLE })
--- Add child menu item
-menuItem.Name = "Main menu child"
+menuItem.Name = "Main menu child wierd"
menuItem.Flags = CMIF_ROOTHANDLE
menuItem.Service = 'Srv/SMI'
menuItem.Parent = hRoot
-genmenu.AddMainMenuItem(menuItem)
+local hChild = genmenu.AddMainMenuItem(menuItem)
---- Add child menu item
-menuItem.Name = "Main menu child 2"
-menuItem.Flags = CMIF_ROOTHANDLE
-menuItem.Service = 'Srv/SMI'
-menuItem.Parent = "&Help"
-genmenu.AddMainMenuItem(menuItem)
+--- Modify menu item
+local CMIM_NAME = tonumber("80000000", 16)
+genmenu.ModifyMenuItem(hChild, { Name = "Main menu child", Flags = CMIM_NAME })