mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-04-26 20:53:14 +00:00
commit
9b5aa43d95
@ -276,12 +276,17 @@ function printError( ... )
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function read( _sReplaceChar, _tHistory, _fnComplete )
|
function read( _sReplaceChar, _tHistory, _fnComplete, _sDefault )
|
||||||
term.setCursorBlink( true )
|
term.setCursorBlink( true )
|
||||||
|
|
||||||
local sLine = ""
|
local sLine
|
||||||
|
if type( _sDefault ) == "string" then
|
||||||
|
sLine = _sDefault
|
||||||
|
else
|
||||||
|
sLine = ""
|
||||||
|
end
|
||||||
local nHistoryPos
|
local nHistoryPos
|
||||||
local nPos = 0
|
local nPos = #sLine
|
||||||
if _sReplaceChar then
|
if _sReplaceChar then
|
||||||
_sReplaceChar = string.sub( _sReplaceChar, 1, 1 )
|
_sReplaceChar = string.sub( _sReplaceChar, 1, 1 )
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user