Advertisement
Guest User

text

a guest
Sep 2nd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | None | 0 0
  1. m = peripheral.wrap("left")
  2. m.clear()
  3. m.setCursorPos(1,1)
  4.  
  5. local function centerText(text)
  6.   x,y = m.getSize()
  7.   x1,y1 = m.getCursorPos()
  8.   m.setCursorPos((math.floor(x/2) - (math.floor(#text/2))), y1)
  9.   m.write(text)
  10. end
  11.  
  12. centerText("")
  13. centerText("Blau = Spawner")
  14. centerText("")
  15. centerText("Weiss = Licht")
  16. centerText("")
  17. centerText("Gruen = Grinder")
  18. centerText("")
  19. centerText("Gelb = Tuer")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement