Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --0123456789ABCDEF0123456789ABCDEF0123456789ABCDE
- local aText = {
- "******************",
- "** Dragons' ATM **",
- "******************",
- "We accept:",
- "Diamonds,",
- "Credits,",
- "And Souls.",
- }
- local sSide = "back"
- local function printCenter(mon, t)
- local w, h = mon.getSize()
- mon.clear()
- local y = math.floor((h / 2) - (#t / 2))
- 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 function printLeft(mon, t)
- local w, h = mon.getSize()
- mon.setTextScale(1)
- mon.clear()
- local y = math.floor((h / 2) - (#t / 2))
- for i, line in ipairs(t) do
- local x = 1
- mon.setCursorPos(x, y + i)
- mon.write(line)
- end
- end
- printLeft(peripheral.wrap(sSide), aText)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement