mathiasbarentsen

Menu - FTB

Oct 26th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. m = peripheral.wrap("top")
  2. os.loadAPI("button")
  3. rednet.open("bottom")
  4.  
  5. function red1()
  6.   rednet.send(1, "Start")
  7.   rednet.send(3, "Start")
  8. end
  9.  
  10. function red2()
  11.   rednet.send(2, "Start")
  12.   rednet.send(3, "Start")
  13. end
  14.  
  15. function red4()
  16.   rednet.send(4, "Start")
  17.   rednet.send(3, "Start")
  18. end
  19.  
  20. function red5()
  21.   rednet.send(5, "Start")
  22.   rednet.send(3, "Start")
  23. end
  24.  
  25. local w,h = m.getSize()
  26. print("Width: "..w.." Height: "..h)
  27.  
  28. button.setMon("top")
  29.  
  30. button.add("Abutton", "Maskin rum ", "flash", 3, 2, 16, 4, colors.gray, colors.lime, colors.white, red1)
  31. button.setState("Abutton", false)
  32.  
  33. button.add("Bbutton", "Mine ", "flash", 3, 6, 16, 8, colors.gray, colors.lime, colors.white, red2)
  34. button.setState("Bbutton", false)
  35.  
  36. button.add("Cbutton", "Farm ", "flash", 3, 10, 16, 12, colors.gray, colors.lime, colors.white, red4)
  37. button.setState("Cbutton", false)
  38.  
  39. button.add("Dbutton", "Test ", "flash", 3, 10, 16, 12, colors.gray, colors.lime, colors.white, red5)
  40. button.setState("Dbutton", false)
  41.  
  42. button.draw()
  43.  
  44. while true do
  45.   button.check()
  46. end
Advertisement
Add Comment
Please, Sign In to add comment