Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local blits = "0123456789abcdef"
- lddbuff = {
- bg = colors.black,
- txt = colors.white,
- buffer = {
- char = {},
- txt = {},
- bg = {},
- },
- term = {
- native = term.native(),
- write = function(text)
- end,
- --add more
- },
- io = {
- write = function(text)
- end,
- --add more
- }
- }
- updateScreenSize = function()
- local scr_x,scr_y = term.getSize()
- for y = #lddbuff.buffer.char, 1, -1 do
- if y > scr_y then
- table.remove(lddbuff.buffer.char,y)
- table.remove(lddbuff.buffer.txt,y)
- table.remove(lddbuff.buffer.bg,y)
- elseif y > #lddbuff.buffer.char then
- lddbuff.buffer.char[y] = (" "):rep(scr_x)
- lddbuff.buffer.txt[y] = ("0"):rep(scr_x)
- lddbuff.buffer.bg[y] = ("f"):rep(scr_x)
- else
- for x = #lddbuff.buffer.char[y], scr_x do
- lddbuff.buffer.char = lddbuff.buffer.char.." "
- lddbuff.buffer.txt = lddbuff.buffer.txt..lddbuff.buffer.txt:sub(-1)
- lddbuff.buffer.bg = lddbuff.buffer.txt..lddbuff.buffer.txt:sub(-1)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement