Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function get_term_size()
- local w,h = term.getSize()
- return w,h
- end
- function print_centered(y, s)
- local w,h = get_term_size()
- term.setCursorPos(math.ceil( (w - string.len(s))/2 ), y)
- print(s)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement