Advertisement
asteroidsteam

DESKTOP2

Aug 7th, 2016
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.93 KB | None | 0 0
  1. function commands()
  2. shell.clearAlias("help")
  3.         shell.setAlias("help", "/os/help")
  4. shell.clearAlias("shutdown")
  5. shell.clearAlias("reboot")
  6. shell.setAlias("pastebin", "/os/un")
  7. shell.setAlias("bgedit", "/os/bgedit")
  8. shell.setAlias("desktop", "/os/desktop")
  9. shell.setAlias("login", "/os/login")
  10. shell.setAlias("uninstall", "/os/uninstall")
  11. shell.clearAlias("paint")
  12. shell.setAlias("ssh", "/os/ssh")
  13. shell.clearAlias("lua")
  14. shell.setAlias("lua", "/os/un")
  15. shell.setAlias("startup", "/os/un")
  16. end
  17. term.setBackgroundColor(colors.white)
  18. term.clear()
  19. term.setCursorPos(1, 3)
  20. term.setBackgroundColor(colors.blue)
  21. term.setTextColor(colors.white)
  22. print("This Desktop supports:")
  23. function ClD()
  24. term.setBackgroundColor(colors.white)
  25. term.clear()
  26. term.setBackgroundColor(colors.blue)
  27. term.clearLine()
  28. term.setCursorPos(1, 1)
  29. end
  30. term.setCursorPos(1, 3)
  31. term.clearLine()
  32. term.setBackgroundColor(colors.blue)
  33. term.setCursorPos(1, 20)
  34. term.clearLine()
  35. term.setCursorPos(1, 20)
  36. local text2 = "J:OS Beta 1.7"
  37. write(text2)
  38. term.setCursorPos(1, 3)
  39. local image3 = paintutils.loadImage("ASSETS/Desktop")
  40. paintutils.drawImage(image3, 3, 5)
  41. -- Draw the text
  42. local tx, ty = 3, 1
  43. local tx2, ty2 = 15, 1
  44. local text2 = "[SETTINGS]"
  45. local text = "[CMD LINE]"
  46. term.setCursorPos(tx, ty)
  47. write(text)
  48. term.setCursorPos(tx2,ty2)
  49. write(text2)
  50.  
  51. -- Event loop
  52. while true do
  53. local sides = {"top","bottom","back","front","left","right"}
  54. local disk1 = disk.isPresent(sides[1])
  55. if disk == true then
  56. disk.eject(sides)
  57. end
  58.   local e, but, cx, cy = os.pullEvent()
  59.   if e == "mouse_click" then
  60.         if cx >= tx and cx <= tx + text:len() and cy == ty then
  61. commands()
  62. term.setBackgroundColor(colors.black)
  63. term.clear()
  64. term.setCursorPos(1, 1)
  65. term.setTextColor(colors.yellow)
  66. print("J:OS 1.7")
  67.           break
  68.           elseif cx >= tx2 and cx <= tx2 + text:len() and cy == ty2 then
  69.       dofile("/os/settings")  
  70.       break  
  71. end
  72.         end
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement