summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/UI.lua
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/scripts/lua/UI.lua')
-rw-r--r--indra/newview/scripts/lua/UI.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/UI.lua b/indra/newview/scripts/lua/UI.lua
new file mode 100644
index 0000000000..f851632bad
--- /dev/null
+++ b/indra/newview/scripts/lua/UI.lua
@@ -0,0 +1,16 @@
+-- Engage the UI LLEventAPI
+
+leap = require 'leap'
+
+local UI = {}
+
+function UI.call(func, parameter)
+ -- 'call' is fire-and-forget
+ leap.send('UI', {op='call', ['function']=func, parameter=parameter})
+end
+
+function UI.getValue(path)
+ return leap.request('UI', {op='getValue', path=path})['value']
+end
+
+return UI