Advertisement
Marlingaming

CCSPS IRON 3.0.0 - Desktop Manager

Jun 15th, 2023 (edited)
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. local DrawLayers = {true,true,true,true,true}
  2. local Background = {"c",colors.black}
  3. local focus_window = -1
  4. local Tabs = {}
  5. local Applications_Desktop = {}
  6. local Applications_Taskbar = {}
  7.  
  8. local Windows = {}--title,file,path,graphics,entities,settings,w,h,x,y
  9.  
  10. local w, h = term.getSize()
  11.  
  12. local function DrawLayer1()
  13. if Background[1] == "c" then
  14. paintutils.drawFilledBox(1,1,w,h-3,Background[2])
  15. end
  16. end
  17.  
  18. local function DrawLayer2()
  19.  
  20. end
  21.  
  22. local function DrawLayer3()
  23.  
  24. end
  25.  
  26. local function DrawLayer4()
  27. paintutils.drawFilledBox(1,h-2,w,h,colors.lightGray)
  28. end
  29.  
  30. local function DrawLayer5()
  31.  
  32. end
  33.  
  34. local function getApplications()
  35. local Path = "System/Programs"
  36. local List = fs.list(Path)
  37. for i = 1, #List do
  38. local Tag = string.sub(List[i],string.len(List[i])-3,string.len(List[3]))
  39. if Tag == ".txt" then
  40. local file = fs.open(fs.combine(Path,List[i])),"r")
  41. local Data = {}
  42. Data[1] = file.readLine()
  43. Data[2] = file.readLine()
  44. Data[3] = file.readLine()
  45. Data[4] = file.readLine()
  46. file.close()
  47. Applications_Desktop[#Applications_Desktop + 1] = Data
  48. end
  49. end
  50. end
  51.  
  52. function Loop()
  53. while true do
  54. Tabs = {fs.list("os/Tasks")}
  55. if DrawLayers[1] == true then DrawLayer1() end
  56. if DrawLayers[2] == true then DrawLayer2() end
  57. if DrawLayers[3] == true then DrawLayer3() end
  58. if DrawLayers[4] == true then DrawLayer4() end
  59. local a, b, c, d, e = os.pullEvent()
  60. if a == "key" then
  61.  
  62. elseif a == "application" then
  63.  
  64. elseif a == "mouse_click" then
  65.  
  66. elseif a == "mouse_drag" then
  67.  
  68. elseif a == "modem_message" then
  69.  
  70. end
  71. end
  72. end
  73.  
  74. getApplications()
  75. Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement