summaryrefslogtreecommitdiff
path: root/indra/newview/scripts/lua/require/login.lua
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2024-06-21 10:06:55 -0400
committerNat Goodspeed <nat@lindenlab.com>2024-06-21 10:06:55 -0400
commit5dbca6bb3ed33cb8f19ea3871ce7ef9f07957088 (patch)
tree348e6f345d7e837ad99ef9e71074becf722d9a07 /indra/newview/scripts/lua/require/login.lua
parentdf0afb59486855b90ca565149564644a76dfee34 (diff)
Move newer Lua modules to scripts/lua/require subdirectory.
Diffstat (limited to 'indra/newview/scripts/lua/require/login.lua')
-rw-r--r--indra/newview/scripts/lua/require/login.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/indra/newview/scripts/lua/require/login.lua b/indra/newview/scripts/lua/require/login.lua
new file mode 100644
index 0000000000..0d8591cace
--- /dev/null
+++ b/indra/newview/scripts/lua/require/login.lua
@@ -0,0 +1,19 @@
+local UI = require 'UI'
+local leap = require 'leap'
+
+local function login(username, password)
+ if username and password then
+ local userpath = '//username_combo/Combo Text Entry'
+ local passpath = '//password_edit'
+ -- first clear anything presently in those text fields
+ for _, path in pairs({userpath, passpath}) do
+ UI.click(path)
+ UI.keypress{keysym='Backsp', path=path}
+ end
+ UI.type{path=userpath, text=username}
+ UI.type{path=passpath, text=password}
+ end
+ leap.send('LLPanelLogin', {op='onClickConnect'})
+end
+
+return login