fixes
This commit is contained in:
parent
26340b57a7
commit
10868b8abd
1 changed files with 11 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
||||||
local function kernel()
|
local function kernel()
|
||||||
_G.sPhone = {
|
_G.sPhone = {
|
||||||
version = "Alpha 3.11",
|
version = "Alpha 3.11.1",
|
||||||
user = "Guest",
|
user = "Guest",
|
||||||
devMode = false,
|
devMode = false,
|
||||||
mainTerm = term.current(),
|
mainTerm = term.current(),
|
||||||
|
@ -365,17 +365,21 @@ local function kernel()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function sPhone.read( _sReplaceChar, _tHistory, _fnComplete, _MouseEvent )
|
function sPhone.read( _sReplaceChar, _tHistory, _fnComplete, _MouseEvent, _presetInput )
|
||||||
term.setCursorBlink( true )
|
term.setCursorBlink( true )
|
||||||
|
|
||||||
local sLine = ""
|
local sLine = _presetInput
|
||||||
|
|
||||||
|
if type(sLine) ~= "string" then
|
||||||
|
sLine = ""
|
||||||
|
end
|
||||||
|
local nPos = #sLine
|
||||||
local nHistoryPos
|
local nHistoryPos
|
||||||
local _MouseX
|
local _MouseX
|
||||||
local _MouseY
|
local _MouseY
|
||||||
local param
|
local param
|
||||||
local sEvent
|
local sEvent
|
||||||
local usedMouse = false
|
local usedMouse = false
|
||||||
local nPos = 0
|
|
||||||
if _sReplaceChar then
|
if _sReplaceChar then
|
||||||
_sReplaceChar = string.sub( _sReplaceChar, 1, 1 )
|
_sReplaceChar = string.sub( _sReplaceChar, 1, 1 )
|
||||||
end
|
end
|
||||||
|
@ -1239,10 +1243,12 @@ end
|
||||||
if y == h and (x >= 23 and x <= w) then
|
if y == h and (x >= 23 and x <= w) then
|
||||||
skipped = true
|
skipped = true
|
||||||
config.write("/.sPhone/config/sPhone","lockEnabled",false)
|
config.write("/.sPhone/config/sPhone","lockEnabled",false)
|
||||||
end
|
|
||||||
end
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
term.redirect(sPhone.mainTerm)
|
term.redirect(sPhone.mainTerm)
|
||||||
if not skipped then
|
if not skipped then
|
||||||
term.setBackgroundColor(sPhone.theme["lock.background"])
|
term.setBackgroundColor(sPhone.theme["lock.background"])
|
||||||
|
|
Loading…
Reference in a new issue