summaryrefslogtreecommitdiff
path: root/indra/llui/llfloaterreglistener.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-03-23 16:58:58 -0500
committerNat Goodspeed <nat@lindenlab.com>2024-03-23 16:58:58 -0500
commitfaff73494ee3247bcca9bb33b59629fd39adb3e7 (patch)
tree4efd822c4d15e30a7f2cb77633a55850d6bd3646 /indra/llui/llfloaterreglistener.cpp
parent93b30f960ea327fe3c36deed72a8075ce0d13f19 (diff)
parent7bf84bdcbf13084ff3b94590e4061b4a6708b4dc (diff)
Merge branch 'release/luau-scripting' of secondlife/viewer into lua-fiber
Diffstat (limited to 'indra/llui/llfloaterreglistener.cpp')
-rw-r--r--indra/llui/llfloaterreglistener.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp
index 7525b8cab3..8316101264 100644
--- a/indra/llui/llfloaterreglistener.cpp
+++ b/indra/llui/llfloaterreglistener.cpp
@@ -37,6 +37,7 @@
#include "llfloaterreg.h"
#include "llfloater.h"
#include "llbutton.h"
+#include "llluafloater.h"
LLFloaterRegListener::LLFloaterRegListener():
LLEventAPI("LLFloaterReg",
@@ -72,6 +73,13 @@ LLFloaterRegListener::LLFloaterRegListener():
"Simulate clicking the named [\"button\"] in the visible floater named in [\"name\"]",
&LLFloaterRegListener::clickButton,
requiredNameButton);
+
+ add("showLuaFloater",
+ "Open the new floater using XML file specified in [\"xml_path\"] with ID in [\"reqid\"]",
+ &LLLuaFloater::showLuaFloater, {llsd::map("xml_path", LLSD(), "reqid", LLSD())});
+ add("getFloaterEvents",
+ "Return the table of Lua Floater events which are send to the script",
+ &LLFloaterRegListener::getLuaFloaterEvents);
}
void LLFloaterRegListener::getBuildMap(const LLSD& event) const
@@ -154,3 +162,9 @@ void LLFloaterRegListener::clickButton(const LLSD& event) const
LLEventPumps::instance().obtain(replyPump).post(reply);
}
}
+
+void LLFloaterRegListener::getLuaFloaterEvents(const LLSD &event) const
+{
+ Response response(llsd::map("events", LLLuaFloater::getEventsData()), event);
+}
+