summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2023-09-19 16:10:17 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2023-09-19 16:10:17 +0100
commitba86a64f10ca4475dbfcc457de72a13694db6125 (patch)
treea8e84b6fab694dfb561ad132d2ac4381c05e6fe5 /indra/newview
parente56d9576c5e57c5820a54e0eb2b0f0805b2030ff (diff)
DRTVWR-589 - click_child, limited support for pushing buttons in a floater
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llluamanager.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llluamanager.cpp b/indra/newview/llluamanager.cpp
index 401ed33c44..a30a321bcc 100644
--- a/indra/newview/llluamanager.cpp
+++ b/indra/newview/llluamanager.cpp
@@ -127,6 +127,18 @@ int lua_close_all_floaters(lua_State *L)
return 1;
}
+int lua_click_child(lua_State *L)
+{
+ std::string parent_name(lua_tostring(L, 1));
+ std::string child_name(lua_tostring(L, 2));
+
+ LLFloater *floater = LLFloaterReg::findInstance(parent_name);
+ LLUICtrl *child = floater->getChild<LLUICtrl>(child_name, true);
+ child->onCommit();
+
+ return 1;
+}
+
int lua_snapshot_to_file(lua_State *L)
{
std::string filename(lua_tostring(L, 1));
@@ -230,6 +242,7 @@ void initLUA(lua_State *L)
lua_register(L, "open_floater", lua_open_floater);
lua_register(L, "close_floater", lua_close_floater);
lua_register(L, "close_all_floaters", lua_close_all_floaters);
+ lua_register(L, "click_child", lua_click_child);
lua_register(L, "open_wearing_tab", lua_open_wearing_tab);
lua_register(L, "snapshot_to_file", lua_snapshot_to_file);