summaryrefslogtreecommitdiff
path: root/indra/newview/scripts
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2024-08-02 20:19:53 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2024-08-02 20:19:53 +0300
commita67a01240cbd58a1800290294be83e7b874fefb6 (patch)
tree8b124bb5d1735cc776ce8ae2c7c14587972efbbc /indra/newview/scripts
parent99307b619a5aa27bef3bb67027c4cb5e54f21ad4 (diff)
Lua api for showing/hiding floater; rename demo scripts
Diffstat (limited to 'indra/newview/scripts')
-rw-r--r--indra/newview/scripts/lua/require/UI.lua23
-rw-r--r--indra/newview/scripts/lua/test_luafloater_demo.lua (renamed from indra/newview/scripts/lua/test_luafloater_demo2.lua)0
-rw-r--r--indra/newview/scripts/lua/test_luafloater_gesture_list.lua (renamed from indra/newview/scripts/lua/test_luafloater_gesture_list2.lua)0
3 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/UI.lua b/indra/newview/scripts/lua/require/UI.lua
index 30b7189c3c..df77eb2b56 100644
--- a/indra/newview/scripts/lua/require/UI.lua
+++ b/indra/newview/scripts/lua/require/UI.lua
@@ -199,4 +199,27 @@ function UI.getToolbarBtnNames()
return leap.request('UI', {op = 'getToolbarBtnNames'}).cmd_names
end
+-- ***************************************************************************
+-- Floaters
+-- ***************************************************************************
+function UI.showFloater(floater_name)
+ leap.send("LLFloaterReg", {op = "showInstance", name = floater_name})
+end
+
+function UI.hideFloater(floater_name)
+ leap.send("LLFloaterReg", {op = "hideInstance", name = floater_name})
+end
+
+function UI.toggleFloater(floater_name)
+ leap.send("LLFloaterReg", {op = "toggleInstance", name = floater_name})
+end
+
+function UI.isFloaterVisible(floater_name)
+ return leap.request("LLFloaterReg", {op = "instanceVisible", name = floater_name}).visible
+end
+
+function UI.closeAllFloaters()
+ return leap.send("UI", {op = "closeAllFloaters"})
+end
+
return UI
diff --git a/indra/newview/scripts/lua/test_luafloater_demo2.lua b/indra/newview/scripts/lua/test_luafloater_demo.lua
index 3903d01e65..3903d01e65 100644
--- a/indra/newview/scripts/lua/test_luafloater_demo2.lua
+++ b/indra/newview/scripts/lua/test_luafloater_demo.lua
diff --git a/indra/newview/scripts/lua/test_luafloater_gesture_list2.lua b/indra/newview/scripts/lua/test_luafloater_gesture_list.lua
index bd397ef2a6..bd397ef2a6 100644
--- a/indra/newview/scripts/lua/test_luafloater_gesture_list2.lua
+++ b/indra/newview/scripts/lua/test_luafloater_gesture_list.lua