DrFair

Title

Feb 1st, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. m = peripheral.wrap("back")
  2. m.setTextScale(2)
  3. sx,sy = m.getSize()
  4. col = { ["white"]=1, ["orange"]=2, ["magenta"]=4, ["lightblue"]=8, ["yellow"]=16, ["lime"]=32, ["pink"]=64, ["gray"]=128, ["lightgray"]=256, ["cyan"]=512, ["purple"]=1024, ["blue"]=2048, ["brown"]=4096, ["green"]=8192, ["red"]=16384, ["black"]=32768 }
  5.  
  6. function swrite(str,x,y,color)
  7. m.setCursorPos(x,y)
  8. m.setTextColor(col[color])
  9. m.write(str)
  10. end
  11.  
  12. function swritecenter(str,y,color)
  13. m.setCursorPos((sx/2-#str/2)+1,y)
  14. m.setTextColor(col[color])
  15. m.write(str)
  16. end
  17.  
  18. m.clear()
  19. swritecenter("Farms and",1,"blue")
  20. swritecenter("Production",2,"blue")
Advertisement
Add Comment
Please, Sign In to add comment