Update sPhone.lua
This commit is contained in:
parent
6e3257f0d9
commit
d5f6906a81
1 changed files with 8 additions and 4 deletions
|
@ -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)
|
||||||
|
@ -479,20 +481,22 @@ end
|
||||||
local f = fs.open(_rApp, "r")
|
local f = fs.open(_rApp, "r")
|
||||||
local script = f.readAll()
|
local script = f.readAll()
|
||||||
f.close()
|
f.close()
|
||||||
os.pullEvent = os.oldPullEvent
|
os.pullEvent = os.oldPullEvent
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue