Update sPhone.lua

This commit is contained in:
Ale32bit 2015-11-02 22:08:38 +01:00
parent 6e3257f0d9
commit d5f6906a81

View file

@ -369,6 +369,7 @@ local function kernel()
end end
function sPhone.yesNo(title, desc, hideUser) function sPhone.yesNo(title, desc, hideUser)
term.setCursorBlink(false)
term.setBackgroundColor(colors.white) term.setBackgroundColor(colors.white)
term.clear() term.clear()
term.setCursorPos(1,1) term.setCursorPos(1,1)
@ -429,6 +430,7 @@ end
if not side then if not side then
side = colors.blue side = colors.blue
end end
term.setCursorBlink(false)
if #fmessage >= #smessage then if #fmessage >= #smessage then
local w, h = term.getSize local w, h = term.getSize
term.setBackgroundColor(side) term.setBackgroundColor(side)
@ -483,16 +485,18 @@ end
local ok, err = pcall(function() setfenv(loadstring(script),getfenv())() end) local ok, err = pcall(function() setfenv(loadstring(script),getfenv())() end)
if not ok then if not ok then
os.pullEvent = os.pullEventRaw os.pullEvent = os.pullEventRaw
sPhone.winOk("Crash: WIP") sPhone.winOk("Crash: "..fs.getName(_rApp), err)
return false return false
end end
os.pullEvent = os.pullEventRaw os.pullEvent = os.pullEventRaw
return true
end end
local function lChat() local function lChat()
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.setCursorBlink(false)
term.setTextColor(colors.white) term.setTextColor(colors.white)
sertextext.center(1," Chat") sertextext.center(1," Chat")
term.setBackgroundColor(colors.white) term.setBackgroundColor(colors.white)