forked from hkc/cc-stuff
statusbar
This commit is contained in:
parent
62891da708
commit
58e4631df8
|
@ -29,7 +29,7 @@ local screen_w, screen_h = term.getSize()
|
|||
parallel.waitForAll(
|
||||
function()
|
||||
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.clearLine()
|
||||
local song = table_of_contents[i]
|
||||
|
@ -37,6 +37,8 @@ function()
|
|||
term.write(string.format("#%2d %9s %s", i, bytes2time(song.length), song.title))
|
||||
end
|
||||
end
|
||||
term.setCursorPos(1, screen_h)
|
||||
term.write(string.format("%s - %d", drive.getState(), drive.getPosition()))
|
||||
os.sleep(0.1)
|
||||
end
|
||||
end,
|
||||
|
|
Loading…
Reference in New Issue