Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitorSide = "top"
- local title = "To-Do List"
- local list = {
- 'Do something',
- 'Do something else',
- 'Etc.'
- }
- local mon = peripheral.wrap(monitorSide)
- local w,h = mon.getSize()
- mon.setBackgroundColor(colors.white)
- mon.clear()
- mon.setCursorPos((w - #title) / 2, 2)
- mon.setTextColor(colors.red)
- mon.write(title)
- mon.setTextColor(colors.blue)
- for i=1, #list do
- mon.setCursorPos(3, 3 + i)
- mon.write(i..'. '..list[i])
- end
Advertisement
Add Comment
Please, Sign In to add comment