Advertisement
asteroidsteam

Desktop beata

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