Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tText = {
- "LOREM IPSUM DOLOR SIT AMET"
- }
- local sSide = "back"
- local nTextScale = 2
- local function printScroll(mon, t)
- local w, h = mon.getSize()
- local scroll = 1
- local maxLen
- for i, line in ipairs(t) do
- if not maxLen or #line > maxLen then
- maxLen = #line
- end
- end
- while true do
- mon.clear()
- for i, line in ipairs(t) do
- mon.setCursorPos(w - scroll, i)
- mon.write(line)
- end
- scroll = scroll + 1
- if scroll >= w + maxLen then
- scroll = 1
- end
- sleep(0.15)
- end
- end
- term.clear()
- term.setCursorPos(1, 1)
- local mon = peripheral.wrap(sSide)
- mon.setTextScale(nTextScale)
- printScroll(mon, tText, sx)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement