Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function writeCenter(text, y, mon)
- local w, h = mon.getSize() or term.getSize()
- if mon then
- mon.setCursorPos( math.ceil( w/2 - #text/2 + 1 ), y )
- mon.write( text )
- else
- term.setCursorPos( math.ceil( w/2 - #text/2 ), y )
- term.write( text )
- end
- end
- local mon = peripherals.wrap("back")
- writeCenter("ME",2,mon)
- writeCenter("Server",3,mon)
Advertisement
Add Comment
Please, Sign In to add comment