Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function writeCentered( text )
- local x, y = term.getSize()
- local centerYPos = y / 2
- local centerXStartingPos = ( x - string.len(text) ) / 2
- term.setCursorPos( centerXStartingPos, centerYPos )
- write( text )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement