Advertisement
tima_gt

tde-shell 3.4 OpenComputers [InDev]

Oct 25th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.27 KB | None | 0 0
  1. local function power()
  2.   gpu.setForeground(0xFFFFFF)
  3.   gpu.setBackground(0x000066)
  4.   term.setCursor(70 - 16, 2)
  5.   io.write('              ')
  6.   term.setCursor(70 - 16, 3)
  7.   io.write('              ')
  8.   term.setCursor(70 - 16, 4)
  9.   io.write('              ')
  10.   term.setCursor(70 - 16, 3)
  11.   io.write('[Перезагрузка]')
  12.   term.setCursor(70 - 16, 4)
  13.   io.write(exit)
  14. end
  15. local function interactive()
  16. local event = require("event")
  17. local event, adress, x, y, cache = event.pull()
  18. if x >= 1 and x <= 6 and y == 1 and event == "touch" then
  19.   print("tde-menu<<")
  20.   elseif x >= 70 - 9 and x <= 70 and y == 1 and event == "touch" then
  21.   power()
  22. end
  23. end
  24. local function main()
  25.   print("loading tde-shell")
  26.   gpu.setBackground(0xFFFFFF)
  27.   gpu.setForeground(0x000000)
  28.   gpu.setResolution(70, 19)
  29.   gpu.fill(1, 1, 70, 19, " ")
  30.   paintutils.loadImage("./tde-wallpaper", 20, 4, 0xFFFFFF)
  31.   gpu.setBackground(0xFFFFFF)
  32.   gpu.fill(20, 1, 1, 19, " ")
  33.   gpu.setBackground(0x0033FF)
  34.   gpu.setForeground(0xFFFFCC)
  35.   gpu.fill(1, 1, 6, 1, " ")
  36.   term.setCursor(1, 1)
  37.   io.write(menu)
  38.   term.setCursor(70 - 9, 1)
  39.   io.write(p)
  40.   power()
  41. end
  42.  
  43. if gpu and paintutils then
  44.  print("All work's currectly! thats good.")
  45.  main()
  46.   else
  47.    print("Start tde-desktop first")
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement