1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-18 06:08:06 +00:00

build using command computer

This commit is contained in:
kepler155c@gmail.com
2017-08-09 10:19:00 -04:00
parent c21afd2875
commit 97f3392fbd
11 changed files with 211 additions and 124 deletions

View File

@@ -10,7 +10,7 @@ function Terminal.scrollable(ct, size)
local function drawScrollbar(oldPos, newPos)
local x, y = oldWin.getCursorPos()
local pos = math.floor(oldPos / size * (h - 1))
oldWin.setCursorPos(w, oldPos + pos + 1)
oldWin.write(' ')
@@ -18,7 +18,7 @@ function Terminal.scrollable(ct, size)
pos = math.floor(newPos / size * (h - 1))
oldWin.setCursorPos(w, newPos + pos + 1)
oldWin.write('#')
oldWin.setCursorPos(x, y)
end
@@ -44,7 +44,8 @@ function Terminal.scrollable(ct, size)
if p ~= scrollPos then
drawScrollbar(scrollPos, p)
scrollPos = p
win.reposition(1, -scrollPos + 1)
--local w, h = win.getSize()
win.reposition(1, -scrollPos + 1, w, h + size)
end
end