Advertisement
Guest User

api

a guest
Mar 31st, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. function desktop()
  2. term.clear()
  3. A = paintutils.loadImage(".bg")
  4. paintutils.drawImage(A,1, 2)
  5. F = paintutils.loadImage(".bgsleep")
  6. local evnt, btn, x, y = os.pullEvent("mouse_click")
  7.   --Drawing the startmenu
  8.   if btn == 1 and x >= 1 and x <= 2 and y >= 18 and y <= 19 then
  9.   paintutils.drawFilledBox(1, 6, 20, 17, colors.gray)
  10.   term.setCursorPos(1, 7)
  11.   print("Package Installer")
  12.   term.setCursorPos(1, 9)
  13.   print("Shell")
  14.   local evnt, btn, x, y = os.pullEvent("mouse_click")
  15.     if btn == 1 and x >= 1 and x <= 5 and y == 9 then
  16.        term.setBackgroundColor(colors.black)
  17.        term.clear()
  18.        term.setCursorPos(1, 1)
  19.        shell.run("shell")
  20.        term.clear()
  21.        term.clear()
  22.     else
  23.     term.clear()
  24.     paintutils.drawImage(A,1, 2)
  25.       local evnt, btn, x, y = os.pullEvent("mouse_click")
  26.       --if btn == 1 and
  27.     end
  28. elseif
  29. btn == 1 and x == 51 and y == 19 then
  30. os.shutdown()
  31. elseif
  32. btn == 1 and x == 50 and y == 19 then
  33. paintutils.drawImage(F,1, 2)
  34. local evnt, btn, x, y = os.pullEvent("mouse_click")
  35.   if btn == 1 then
  36.   term.clear()
  37.   term.setBackgroundColor(colors.black)
  38.   api.desktop()
  39.  end
  40. else
  41. api.desktop()
  42. end
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement