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
|
||||
|
||||
local function drawLine(termlike, obj)
|
||||
termlike.setBackgroundColor(colors.black)
|
||||
termlike.setTextColor(colors.white)
|
||||
termlike.write(obj.req.name)
|
||||
termlike.write(" ")
|
||||
|
|
15
test.lua
15
test.lua
|
@ -14,10 +14,6 @@ local tabview_window = nil
|
|||
|
||||
local function display()
|
||||
local tw,th = term.getSize()
|
||||
term.setCursorBlink(false)
|
||||
term.setBackgroundColor(colors.black)
|
||||
term.clear()
|
||||
|
||||
term.setCursorPos(1,1)
|
||||
term.setBackgroundColor(colors.yellow)
|
||||
term.setTextColor(colors.black)
|
||||
|
@ -31,7 +27,11 @@ local function display()
|
|||
term.write(" R ")
|
||||
end
|
||||
term.write(" ^ v ")
|
||||
|
||||
term.setBackgroundColor(colors.black)
|
||||
term.setTextColor(colors.white)
|
||||
term.setCursorPos(1,2)
|
||||
term.clearLine()
|
||||
|
||||
for name, tab in pairs(tabview.allTabs()) do
|
||||
tab.displayTab(tab)
|
||||
|
@ -107,6 +107,13 @@ local function init()
|
|||
term.redirect(monitor)
|
||||
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()
|
||||
tabview_window = window.create(term.current(), 1, 1+header_lines, tw, th-header_lines)
|
||||
tabview.setTerm(tabview_window)
|
||||
|
|
Loading…
Reference in a new issue