Update settings.lua

This commit is contained in:
Ale32bit 2016-03-19 23:01:34 +01:00
parent c9e30d782c
commit 06bd10065f

View file

@ -145,30 +145,31 @@ local w, h = term.getSize()
local function redraw() local function redraw()
clear() clear()
local w, h = term.getSize() local w, h = term.getSize()
paintutils.drawLine(1,1,w,1, colors.blue) paintutils.drawLine(1,1,w,1, colors.blue)
term.setTextColor(colors.white) term.setTextColor(colors.white)
term.setCursorPos(2,1) term.setCursorPos(2,1)
write(sPhone.user) write(sPhone.user)
term.setCursorPos(w,1) term.setCursorPos(w,1)
write("X") write("X")
term.setCursorPos(1,3) term.setCursorPos(1,3)
term.setBackgroundColor(colors.white) term.setBackgroundColor(colors.white)
term.setTextColor(colors.black) term.setTextColor(colors.black)
end end
redraw() redraw()
while true do
redraw()
local name, id = sPhone.menu(menu, "Settings","X")
if id == 0 then
return
elseif id == 1 then
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
elseif id == 2 then
changePassword()
elseif id == 3 then
changeLabel()
elseif id == 4 then
clearLabel()
end
end
while true do
redraw()
local name, id = sPhone.menu(menu, "Settings",true)
if id == 0 then
return
elseif id == 1 then
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
elseif id == 2 then
changePassword()
elseif id == 3 then
changeLabel()
elseif id == 4 then
clearLabel()
end
end