Marlingaming

CC Tweaked CCSPS 20 - (Removed) Desktop

Feb 21st, 2022 (edited)
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. local Items = {}
  2. local w, h = term.getSize()
  3.  
  4. function DrawDesktop()
  5. term.setBackgroundColor(colors.black)
  6. paintutils.drawFilledBox(1,1,w,h-1,colors.black)
  7. local x = 2
  8. local y = 2
  9. local MW = w / 7
  10. for i = 1, #Items do
  11. if Items[i][2] == "n" then
  12.  
  13. else
  14. local Image = paintutils.loadImage(Items[i][2])
  15. paintutils.drawImage(Image,x,y)
  16. end
  17. term.setCursorPos(x, y + 4)
  18. term.write(Items[i][1])
  19. if x + 7 >= MW then
  20. x = 2
  21. y = y + 6
  22. else
  23. x = x + 7
  24. end
  25. end
  26. end
  27.  
  28. DrawDesktop()
Add Comment
Please, Sign In to add comment