Advertisement
CodeCrafter

menu

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