summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/LLNotification.lua
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-04-22 14:56:52 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-04-22 14:56:52 +0300
commitbb1f3f08cf93facbf926e57384674441be7e2884 (patch)
tree970e068d8e2b02b1e89088def45c71080b020a46 /indra/newview/scripts/lua/LLNotification.lua
parent40a881dd26cbf0b92e03ec20e296b94e89bdb2c3 (diff)
Add demo script with idle and notification interactions
Diffstat (limited to 'indra/newview/scripts/lua/LLNotification.lua')
-rw-r--r--indra/newview/scripts/lua/LLNotification.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/LLNotification.lua b/indra/newview/scripts/lua/LLNotification.lua
new file mode 100644
index 0000000000..f47730d1cc
--- /dev/null
+++ b/indra/newview/scripts/lua/LLNotification.lua
@@ -0,0 +1,15 @@
+-- Engage the LLNotificationsListener LLEventAPI
+
+leap = require 'leap'
+
+local LLNotification = {}
+
+function LLNotification.add(name, substitutions)
+ leap.send('LLNotifications', {op='requestAdd', name=name, substitutions=substitutions})
+end
+
+function LLNotification.requestAdd(name, substitutions)
+ return leap.request('LLNotifications', {op='requestAdd', name=name, substitutions=substitutions})['response']
+end
+
+return LLNotification