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_luafloater_speedometer.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_luafloater_speedometer.lua')
-rw-r--r-- | indra/newview/scripts/lua/test_luafloater_speedometer.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/scripts/lua/test_luafloater_speedometer.lua b/indra/newview/scripts/lua/test_luafloater_speedometer.lua index af7189a2cb..8bc18ad286 100644 --- a/indra/newview/scripts/lua/test_luafloater_speedometer.lua +++ b/indra/newview/scripts/lua/test_luafloater_speedometer.lua @@ -1,8 +1,9 @@ local Floater = require 'Floater' local leap = require 'leap' -local popup = require 'popup' local startup = require 'startup' local Timer = (require 'timers').Timer +local UI = require 'UI' +local popup = UI.popup local max_speed = 0 local flt = Floater("luafloater_speedometer.xml") startup.wait('STATE_STARTED') @@ -25,7 +26,7 @@ end msg = 'Are you sure you want to run this "speedometer" script?' response = popup:alertYesCancel(msg) -if response.OK_okcancelbuttons then +if response == 'OK' then flt:show() timer = Timer(1, idle, true) -- iterate end |