diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloaterreg.cpp | 10 | ||||
-rw-r--r-- | indra/llui/llfloaterreg.h | 2 | ||||
-rw-r--r-- | indra/llui/llfloaterreglistener.cpp | 11 | ||||
-rw-r--r-- | indra/llui/llfloaterreglistener.h | 1 |
4 files changed, 24 insertions, 0 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index 989ce12d09..a9ed678973 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -607,3 +607,13 @@ U32 LLFloaterReg::getVisibleFloaterInstanceCount() return count; } + +LLSD LLFloaterReg::getFloaterNames() +{ + LLSD names; + for (auto &it : sGroupMap) + { + names.append(it.first); + } + return names; +} diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h index 43f3f7b170..31a334b89c 100644 --- a/indra/llui/llfloaterreg.h +++ b/indra/llui/llfloaterreg.h @@ -153,6 +153,8 @@ public: static void blockShowFloaters(bool value) { sBlockShowFloaters = value;} static U32 getVisibleFloaterInstanceCount(); + + static LLSD getFloaterNames(); }; #endif diff --git a/indra/llui/llfloaterreglistener.cpp b/indra/llui/llfloaterreglistener.cpp index 8316101264..e17f9f4dd6 100644 --- a/indra/llui/llfloaterreglistener.cpp +++ b/indra/llui/llfloaterreglistener.cpp @@ -80,6 +80,11 @@ LLFloaterRegListener::LLFloaterRegListener(): add("getFloaterEvents", "Return the table of Lua Floater events which are send to the script", &LLFloaterRegListener::getLuaFloaterEvents); + + add("getFloaterNames", + "Return the table of all registered floaters", + &LLFloaterRegListener::getFloaterNames, + llsd::map("reply", LLSD())); } void LLFloaterRegListener::getBuildMap(const LLSD& event) const @@ -121,6 +126,12 @@ void LLFloaterRegListener::instanceVisible(const LLSD& event) const event); } + +void LLFloaterRegListener::getFloaterNames(const LLSD &event) const +{ + Response response(llsd::map("floaters", LLFloaterReg::getFloaterNames()), event); +} + void LLFloaterRegListener::clickButton(const LLSD& event) const { // If the caller requests a reply, build the reply. diff --git a/indra/llui/llfloaterreglistener.h b/indra/llui/llfloaterreglistener.h index 9cb0af2de5..2165b1b62f 100644 --- a/indra/llui/llfloaterreglistener.h +++ b/indra/llui/llfloaterreglistener.h @@ -49,6 +49,7 @@ private: void toggleInstance(const LLSD& event) const; void instanceVisible(const LLSD& event) const; void clickButton(const LLSD& event) const; + void getFloaterNames(const LLSD &event) const; void getLuaFloaterEvents(const LLSD &event) const; }; |