e
This commit is contained in:
1 parent
abd573f686
commit
701bfa5198
9 files changed
+79
-32
No files matched your search
@@ -1,6 +1,6 @@
|
||||
local screen = {}
|
||||
|
||||
local function write(sText)
|
||||
function write(sText)
|
||||
local w, h = term.getSize()
|
||||
local x, y = term.getCursorPos()
|
||||
|
||||
@@ -56,7 +56,7 @@ local function write(sText)
|
||||
return nLinesPrinted
|
||||
end
|
||||
|
||||
function screen.print(...)
|
||||
function print(...)
|
||||
local nLinesPrinted = 0
|
||||
local nLimit = select("#", ...)
|
||||
for n = 1, nLimit do
|
||||
@@ -69,7 +69,11 @@ function screen.print(...)
|
||||
nLinesPrinted = nLinesPrinted + write("\n")
|
||||
end
|
||||
|
||||
function screen.printInline(...)
|
||||
function screen.print(...)
|
||||
print(...)
|
||||
end
|
||||
|
||||
function printInline(...)
|
||||
local nLinesPrinted = 0
|
||||
local nLimit = select("#", ...)
|
||||
for n = 1, nLimit do
|
||||
@@ -77,8 +81,12 @@ function screen.printInline(...)
|
||||
nLinesPrinted = nLinesPrinted + write(s)
|
||||
end
|
||||
end
|
||||
function screen.printInline(...)
|
||||
printInline(...)
|
||||
end
|
||||
|
||||
function screen.clear()
|
||||
term.setCursorPos(1,1)
|
||||
term.clear()
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user