Added term.reset(). Closes #1377.

This commit is contained in:
Florian Nücke 2015-08-29 12:31:19 +02:00
parent 0387264743
commit 84d912cef8

View File

@ -31,6 +31,16 @@ function term.clear()
cursorX, cursorY = 1, 1
end
function term.reset()
if term.isAvailable() then
local maxw, maxh = component.gpu.maxResolution()
component.gpu.setResolution(maxw, maxh)
component.gpu.setBackground(0x000000)
component.gpu.setForeground(0xFFFFFF)
term.clear()
end
end
function term.clearLine()
if term.isAvailable() then
local w = component.gpu.getResolution()