Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tText = {
- "First line", -- you can change the lines here
- "Second line",
- "Some more",
- "lines here"
- -- and you can add more if you want, just don't forget to put the commas (,) at the end of the lines (except for the last one)
- }
- local sSide = "left"
- local nTextSize = 1 -- change the text size here (from 1 to 5)
- local function printCenter(mon, t)
- local w, h = mon.getSize()
- local y = math.floor((h / 2) - (#t / 2)) - 1
- for i, line in ipairs(t) do
- local x = math.floor((w / 2) - (#line / 2))
- mon.setCursorPos(x, y + i)
- mon.write(line)
- end
- end
- local mon = peripheral.wrap(right)
- mon.setTextScale(nTextSize)
- printCenter(mon, tText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement