Fix test.lua always clearing terminal in display
This commit is contained in:
parent
20a4488a64
commit
67c418f597
|
@ -57,6 +57,7 @@ local function fetch(wait_for)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function drawLine(termlike, obj)
|
local function drawLine(termlike, obj)
|
||||||
|
termlike.setBackgroundColor(colors.black)
|
||||||
termlike.setTextColor(colors.white)
|
termlike.setTextColor(colors.white)
|
||||||
termlike.write(obj.req.name)
|
termlike.write(obj.req.name)
|
||||||
termlike.write(" ")
|
termlike.write(" ")
|
||||||
|
|
15
test.lua
15
test.lua
|
@ -14,10 +14,6 @@ local tabview_window = nil
|
||||||
|
|
||||||
local function display()
|
local function display()
|
||||||
local tw,th = term.getSize()
|
local tw,th = term.getSize()
|
||||||
term.setCursorBlink(false)
|
|
||||||
term.setBackgroundColor(colors.black)
|
|
||||||
term.clear()
|
|
||||||
|
|
||||||
term.setCursorPos(1,1)
|
term.setCursorPos(1,1)
|
||||||
term.setBackgroundColor(colors.yellow)
|
term.setBackgroundColor(colors.yellow)
|
||||||
term.setTextColor(colors.black)
|
term.setTextColor(colors.black)
|
||||||
|
@ -31,7 +27,11 @@ local function display()
|
||||||
term.write(" R ")
|
term.write(" R ")
|
||||||
end
|
end
|
||||||
term.write(" ^ v ")
|
term.write(" ^ v ")
|
||||||
|
|
||||||
term.setBackgroundColor(colors.black)
|
term.setBackgroundColor(colors.black)
|
||||||
|
term.setTextColor(colors.white)
|
||||||
|
term.setCursorPos(1,2)
|
||||||
|
term.clearLine()
|
||||||
|
|
||||||
for name, tab in pairs(tabview.allTabs()) do
|
for name, tab in pairs(tabview.allTabs()) do
|
||||||
tab.displayTab(tab)
|
tab.displayTab(tab)
|
||||||
|
@ -107,6 +107,13 @@ local function init()
|
||||||
term.redirect(monitor)
|
term.redirect(monitor)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
term.setCursorBlink(false)
|
||||||
|
term.setBackgroundColor(colors.black)
|
||||||
|
term.setTextColor(colors.white)
|
||||||
|
term.clear()
|
||||||
|
term.setCursorPos(1,2)
|
||||||
|
term.write("Booting test.lua")
|
||||||
|
|
||||||
local tw, th = term.getSize()
|
local tw, th = term.getSize()
|
||||||
tabview_window = window.create(term.current(), 1, 1+header_lines, tw, th-header_lines)
|
tabview_window = window.create(term.current(), 1, 1+header_lines, tw, th-header_lines)
|
||||||
tabview.setTerm(tabview_window)
|
tabview.setTerm(tabview_window)
|
||||||
|
|
Loading…
Reference in a new issue