diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-09-30 11:51:09 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-09-30 11:51:09 -0400 |
commit | de61551df3219dae2238591bae5fa7b6c857e6b0 (patch) | |
tree | f862de93761661afba4cd3299507b3e6f2ebfd8d /indra/newview/skins/default/xui | |
parent | 48dc344a9e65451c9e2b267fba7d3e01bdbbf801 (diff) |
DRTVWR-589: Emulate print() better, show output on Lua floater.
Break out a lua_print_msg() function common to print_debug(), print_info() and
print_warning(). Instead of accepting a single argument, lua_print_msg()
accepts arbitrary arguments, passing each to the Lua tostring() function and
concatenating the results. In addition to returning the combined string to its
caller for level-appropriate logging, it also posts the message to a "lua
output" LLEventPump for any interested party.
Make LLFloaterLUADebug listen on "lua output" when the floater is constructed,
storing the connection in an LLTempBoundListener to stop listening when the
floater is destroyed. Append each message to the floater's output panel with a
line break.
Make LLTextEditor::addLineBreakChar() public. insertText("\n") only appends a
little rectangle glyph.
Enlarge the text capacity of the floater's output panel to be able to report
whatever messages a Lua script wants to print.
Add diagnostic logging for posting events from Lua, and receiving events to
forward to Lua.
Since lua_pop() is a macro implemented on lua_settop(), replace the awkward
construct lua_pop(L, lua_gettop(L)) with lua_settop(L, 0).
Use lambdas instead of std::bind() to connect LuaListener and LLLeapListener.
Diffstat (limited to 'indra/newview/skins/default/xui')
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_lua_debug.xml | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/newview/skins/default/xui/en/floater_lua_debug.xml b/indra/newview/skins/default/xui/en/floater_lua_debug.xml index 0de26161e7..f03739f7c2 100644 --- a/indra/newview/skins/default/xui/en/floater_lua_debug.xml +++ b/indra/newview/skins/default/xui/en/floater_lua_debug.xml @@ -55,6 +55,7 @@ layout="topleft" name="result_text" follows="left|top" + max_length="65536" width="515" top_delta="40" word_wrap="true" /> |