Advertisement
CodeCrafter

Menu

Mar 23rd, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 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,3,2)
  17. paintutils.drawImage(Image3,3,7)
  18. paintutils.drawImage(Image4,12,1)
  19. paintutils.drawImage(Image5,10,0,1)
  20. term.setTextColor(colors.red)
  21. term.setCursorPos(4,3)
  22. print("Worm")
  23. term.setCursorPos(3,9)
  24. print("FileManager")
  25. term.setCursorPos(16,9)
  26. print("Shutdown")
  27. term.setCursorPos(12,3)
  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. term.setCursorPos(24,5)
  34. print("Tgl")
  35.  
  36.  
  37. while true do
  38. local even, button, X, Y = os.pullEvent("mouse_click")
  39.  
  40.  
  41. XY = X..","..Y
  42.  
  43. if XY == "4,3" then
  44. shell.run("worm")
  45. break
  46. end
  47. if XY == "24,5" then
  48. if fs.exists("tgl") then
  49. shell.run("tgl")
  50. else
  51. shell.run("Tglinstall")
  52. if XY == "3,9" then
  53. shell.run("FileManager")
  54. break
  55. end
  56.  
  57. if XY == "16,9" then
  58. os.shutdown()
  59. break
  60. end
  61.  
  62. if XY == "12,3" and button == 1 then
  63. shell.run("secret/alongtimeago")
  64. break
  65. end
  66.  
  67. if XY == "12,3" and button == 2 then
  68. shell.run("monitor",Side,"secret/alongtimeago")
  69. break
  70. end
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement