Advertisement
Guest User

Screen

a guest
Jul 24th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.31 KB | None | 0 0
  1. local mon = peripheral.wrap("bottom")
  2.  
  3. local wM,hM = mon.getSize()
  4.  
  5.  
  6. function printCentered (text, yVal)
  7. length = string.len(text)
  8. minus = math.floor(wM-length)
  9. x = math.floor(minus/2)
  10. mon.setCursorPos(x+1, yVal)
  11. mon.write(text)
  12. end
  13.  
  14. mon.setTextScale(1.8)
  15. mon.clear()
  16. printCentered("ME Terminal", 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement