From ba86a64f10ca4475dbfcc457de72a13694db6125 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 19 Sep 2023 16:10:17 +0100 Subject: DRTVWR-589 - click_child, limited support for pushing buttons in a floater --- indra/newview/llluamanager.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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(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); -- cgit v1.2.3