mathiasbarentsen

Portal

Nov 24th, 2013
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. m = peripheral.wrap("right")
  2. m2 = peripheral.wrap("front")
  3.  
  4. local w, h = m.getSize()
  5. local w2, h2 = m2.getSize()
  6.  
  7. local text = "  "
  8. local text2 = "  Twilight"
  9.  
  10. -- Center text
  11. m.setCursorPos(math.ceil((w / 2) - (text:len() / 2)), 3)
  12.  
  13. m.clear()
  14. m2.clear()
  15.  
  16. term.setCursorPos(1,1)
  17. print("W: "..w.." H: "..h)
  18.  
  19. m.setTextScale(1)
  20.  
  21. --m.setCursorPos(6,3)
  22. m.write(text)
  23. m2.setCursorPos(math.ceil((w2 / 2) - (text2:len() / 2)), 3)
  24. m2.write(text2)
Advertisement
Add Comment
Please, Sign In to add comment