Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- w,h = term.getSize()
- term.clear()
- term.setCursorPos(1,1)
- function printCenter(line)
- local width = string.len(line)
- if width < w then
- local x,y = term.getCursorPos()
- term.setCursorPos(w/2 - width/2,y)
- end
- print(line)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement