summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/scripts/lua/require')
-rw-r--r--indra/newview/scripts/lua/require/UI.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/UI.lua b/indra/newview/scripts/lua/require/UI.lua
index 1eee4657f4..28488ff3e1 100644
--- a/indra/newview/scripts/lua/require/UI.lua
+++ b/indra/newview/scripts/lua/require/UI.lua
@@ -135,4 +135,32 @@ function UI.snapshot(...)
args.op = 'saveSnapshot'
return leap.request('LLViewerWindow', args).result
end
+
+-- ***************************************************************************
+-- Top menu
+-- ***************************************************************************
+
+function UI.addMenu(...)
+ local args = mapargs('name,label', ...)
+ args.op = 'addMenu'
+ return leap.request('UI', args)
+end
+
+function UI.addMenuBranch(...)
+ local args = mapargs('name,label,parent_menu', ...)
+ args.op = 'addMenuBranch'
+ return leap.request('UI', args)
+end
+
+function UI.addMenuItem(...)
+ local args = mapargs('name,label,parent_menu,func,param', ...)
+ args.op = 'addMenuItem'
+ return leap.request('UI', args)
+end
+
+function UI.addMenuSeparator(...)
+ local args = mapargs('parent_menu', ...)
+ args.op = 'addMenuSeparator'
+ return leap.request('UI', args)
+end
return UI