Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tText = {
- "1. Sorting system",
- "2. Quarry",
- "3. Build more..."
- }
- local sSide = "top"
- 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
- mon = peripheral.wrap(sSide)
- mon.clear()
- mon.setCursorPos(1,1)
- mon.write("---------- ToDo ----------")
- printCenter(peripheral.wrap(sSide), tText)
Add Comment
Please, Sign In to add comment