Advertisement
CodeCrafter

menu3

Mar 22nd, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. local Side = "right"
  2.  
  3. -- Here begins the Code...
  4.  
  5.  
  6. local Image1 = paintutils.loadImage(".Menu")
  7. local Image2 = paintutils.loadImage(".Icon1")
  8. local Image3 = paintutils.loadImage(".Icon2")
  9. local Image4 = paintutils.loadImage(".Icon3")
  10. local Image5 = paintutils.loadImage(".Icon4")
  11.  
  12. term.clear()
  13. term.setCursorPos(1,1)
  14.  
  15. paintutils.drawImage(Image1,1,1)
  16. paintutils.drawImage(Image2,1,5)
  17. paintutils.drawImage(Image3,16,1)
  18. paintutils.drawImage(Image4,28,1)
  19. paintutils.drawImage(Image5,27,1)
  20. term.setTextColor(colors.red)
  21. term.setCursorPos(3,6)
  22. print("Worm")
  23. term.setCursorPos(15,1)
  24. print("FileManager")
  25. term.setCursorPos(33,1)
  26. print("Shutdown")
  27. term.setCursorPos(27,1)
  28. print("Movie")
  29. term.setCursorPos(1,17)
  30. print("left = normal right = monitor")
  31. term.setCursorPos(1,1)
  32. term.setBackgroundColor(colors.black)
  33.  
  34.  
  35. while true do
  36. local even, button, X, Y = os.pullEvent("mouse_click")
  37.  
  38.  
  39. XY = X..","..Y
  40.  
  41. if XY == "3,6" then
  42. shell.run("worm")
  43. break
  44. end
  45.  
  46. if XY == "15,1" then
  47. shell.run("FileManager")
  48. break
  49. end
  50.  
  51. if XY == "33,1" then
  52. os.shutdown()
  53. break
  54. end
  55.  
  56. if XY == "27,1" and button == 1 then
  57. shell.run("secret/alongtimeago")
  58. break
  59. end
  60.  
  61. if XY == "27,1" and button == 2 then
  62. shell.run("monitor",Side,"secret/alongtimeago")
  63. break
  64. end
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement