summaryrefslogtreecommitdiff
path: root/indra/media_plugins/example
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-04-02 11:29:29 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-04-02 11:29:29 -0400
commit1866d1a450b7857da82ceafbd2c6581d87b7f334 (patch)
tree983b8efa465dae24b82310d2aa3e2851573008fe /indra/media_plugins/example
parentcc8299d153b9aa81558951cb6b1a19693fb52982 (diff)
Add startup.lua module with startup.ensure(), wait() functions.
This lets a calling script verify that it's running at the right point in the viewer's life cycle. A script that wants to interact with the SL agent wouldn't work if run from the viewer's command line -- unless it calls startup.wait("STATE_STARTED"), which pauses until login is complete. Modify test_luafloater_demo.lua and test_luafloater_gesture_list.lua to find their respective floater XUI files in the same directory as themselves. Make them both capture the reqid returned by the "showLuaFloater" operation, and filter for events bearing the same reqid. This paves the way for a given script to display more than one floater concurrently. Make test_luafloater_demo.lua (which does not require in-world resources) wait until 'STATE_LOGIN_WAIT', the point at which the viewer has presented the login screen. Make test_luafloater_gesture_list.lua (which interacts with the agent) wait until 'STATE_STARTED', the point at which the viewer is fully in world. Either or both can now be launched from the viewer's command line.
Diffstat (limited to 'indra/media_plugins/example')
0 files changed, 0 insertions, 0 deletions