Update sPhone.lua

This commit is contained in:
Ale32bit 2015-10-10 23:58:23 +02:00
parent 5ac2fa1151
commit 736f4af057

View file

@ -548,37 +548,41 @@ end
while true do while true do
drawHome() drawHome()
term.setCursorBlink(false) term.setCursorBlink(false)
local _,m,x,y = os.pullEvent("mouse_click") local autoLockTimer = os.startTimer(120)
local e,m,x,y = os.pullEvent()
if y == 1 then if e == "mouse_click" then
if x < 26 and x > 22 then if y == 1 then
footerMenu() if x < 26 and x > 22 then
end footerMenu()
else end
if (y > 2 and x > 1) and (y < 6 and x < 9) then else
term.setBackgroundColor(colors.black) if (y > 2 and x > 1) and (y < 6 and x < 9) then
term.clear() term.setBackgroundColor(colors.black)
term.setCursorPos(1,1) term.clear()
term.setTextColor(colors.white) term.setCursorPos(1,1)
print("Type \"exit\" to close the shell") term.setTextColor(colors.white)
shell.run("/rom/programs/shell") print("Type \"exit\" to close the shell")
elseif (y > 2 and x > 10) and (y < 7 and x < 16) then shell.run("/rom/programs/shell")
shell.run("/.sPhone/apps/system/sID") elseif (y > 2 and x > 10) and (y < 7 and x < 16) then
elseif (y > 2 and x > 18) and (y < 6 and x < 25) then shell.run("/.sPhone/apps/system/sID")
login() elseif (y > 2 and x > 18) and (y < 6 and x < 25) then
elseif (y > 6 and x > 1) and (y < 10 and x < 11) then login()
shell.run("/.sPhone/apps/buddies") elseif (y > 6 and x > 1) and (y < 10 and x < 11) then
elseif (y > 6 and x > 11) and (y < 10 and x < 18) then shell.run("/.sPhone/apps/buddies")
lChat() elseif (y > 6 and x > 11) and (y < 10 and x < 18) then
elseif (y > 6 and x > 18) and (y < 10 and x < 24) then lChat()
shell.run("/.sPhone/apps/sms") elseif (y > 6 and x > 18) and (y < 10 and x < 24) then
elseif (y > 10 and x > 2) and (y < 14 and x < 8) then shell.run("/.sPhone/apps/sms")
shell.run("/.sPhone/apps/cstwallet") elseif (y > 10 and x > 2) and (y < 14 and x < 8) then
elseif (y > 10 and x > 9) and (y < 14 and x < 15) then shell.run("/.sPhone/apps/cstwallet")
shell.run("/.sPhone/apps/gps") elseif (y > 10 and x > 9) and (y < 14 and x < 15) then
elseif (y > 10 and x > 17) and (y < 14 and x < 24) then shell.run("/.sPhone/apps/gps")
shell.run("/.sPhone/apps/system/info") elseif (y > 10 and x > 17) and (y < 14 and x < 24) then
shell.run("/.sPhone/apps/system/info")
end
end end
elseif e == "timer" and m == autoLockTimer then
login()
end end
end end
end end