Fix test.lua always clearing terminal in display

This commit is contained in:
Ben 2024-06-02 02:35:00 +02:00
parent 20a4488a64
commit 67c418f597
Signed by: ben
GPG key ID: 0F54A7ED232D3319
2 changed files with 12 additions and 4 deletions

View file

@ -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(" ")

View file

@ -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)