statusbar
This commit is contained in:
parent
62891da708
commit
58e4631df8
|
@ -29,7 +29,7 @@ local screen_w, screen_h = term.getSize()
|
||||||
parallel.waitForAll(
|
parallel.waitForAll(
|
||||||
function()
|
function()
|
||||||
while running do
|
while running do
|
||||||
for i = 1, math.min(screen_h, 48) do
|
for i = 1, math.min(screen_h - 1, 48) do
|
||||||
term.setCursorPos(1, i)
|
term.setCursorPos(1, i)
|
||||||
term.clearLine()
|
term.clearLine()
|
||||||
local song = table_of_contents[i]
|
local song = table_of_contents[i]
|
||||||
|
@ -37,6 +37,8 @@ function()
|
||||||
term.write(string.format("#%2d %9s %s", i, bytes2time(song.length), song.title))
|
term.write(string.format("#%2d %9s %s", i, bytes2time(song.length), song.title))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
term.setCursorPos(1, screen_h)
|
||||||
|
term.write(string.format("%s - %d", drive.getState(), drive.getPosition()))
|
||||||
os.sleep(0.1)
|
os.sleep(0.1)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue