Advertisement
mrkarp

Untitled

Nov 27th, 2014
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. function PrintCentered(sText)
  2. local w, h = m.getSize()
  3. local x, y = m.getCursorPos()
  4. x = math.max(math.floor((w / 2) - (#sText / 2)), 0)
  5. m.setCursorPos(x, y)
  6. m.write(sText)
  7. end
  8.  
  9.  
  10. m = peripheral.wrap("left")
  11. m.clear()
  12. m.setTextSize(2)
  13. m.setTextColor(colors.purple)
  14. PrintCentered("Quarry Location")
  15. PrintCentered("Test")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement