diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-23 22:39:30 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-23 22:39:30 -0400 |
commit | e6d8379744b08f9a52af6734ba1f0e1b50fb5906 (patch) | |
tree | c882e265b9f060bfb24ce21f98b613b06305b907 /indra/newview/scripts/lua/test_popup.lua | |
parent | 2e815acb529159f5b6f0a4365a2eaf64d35330cc (diff) |
Massage results from UI.popup() for ease of use.
In particular, where the raw leap.request().response call would return
{OK_okcancelbuttons=true}, just return the string 'OK' or 'Cancel'.
Update existing consumer scripts.
Diffstat (limited to 'indra/newview/scripts/lua/test_popup.lua')
-rw-r--r-- | indra/newview/scripts/lua/test_popup.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/scripts/lua/test_popup.lua b/indra/newview/scripts/lua/test_popup.lua index 156c09c78f..7a11895669 100644 --- a/indra/newview/scripts/lua/test_popup.lua +++ b/indra/newview/scripts/lua/test_popup.lua @@ -1,7 +1,10 @@ UI = require 'UI' popup = UI.popup +startup = require 'startup' + +startup.wait('STATE_STARTED') response = popup:alert('This just has a Close button') -response = popup:alertOK(string.format('You said "%s", is that OK?', next(response))) -response = popup:alertYesCancel(string.format('You said "%s"', next(response))) -popup:tip(string.format('You said "%s"', next(response))) +response = popup:alertOK(string.format('You said "%s", is that OK?', response)) +response = popup:alertYesCancel(string.format('You said "%s"', response)) +popup:tip(string.format('You said "%s"', response)) |