DrFair

titlescreen

Jan 27th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. line1 = "Crafting and"
  2. line2 = "storage area"
  3. color = "blue"
  4. m = peripheral.wrap("back")
  5. sx,sy = m.getSize()
  6. sx = sx + 1
  7. sy = sy + 1
  8. 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 }
  9.  
  10. function swritecenter(str,y,color)
  11. m.setCursorPos((sx/2-#str/2),y)
  12. m.setTextColor(col[color])
  13. m.write(str)
  14. end
  15.  
  16. m.clear()
  17. m.setTextScale(2)
  18. swritecenter(line1,1,color)
  19. swritecenter(line2,2,color)
Advertisement
Add Comment
Please, Sign In to add comment