Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local DrawLayers = {true,true,true,true,true}
- local Background = {"c",colors.black}
- local focus_window = -1
- local Tabs = {}
- local Applications_Desktop = {}
- local Applications_Taskbar = {}
- local Windows = {}--title,file,path,graphics,entities,settings,w,h,x,y
- local w, h = term.getSize()
- local function DrawLayer1()
- if Background[1] == "c" then
- paintutils.drawFilledBox(1,1,w,h-3,Background[2])
- end
- end
- local function DrawLayer2()
- end
- local function DrawLayer3()
- end
- local function DrawLayer4()
- paintutils.drawFilledBox(1,h-2,w,h,colors.lightGray)
- end
- local function DrawLayer5()
- end
- local function getApplications()
- local Path = "System/Programs"
- local List = fs.list(Path)
- for i = 1, #List do
- local Tag = string.sub(List[i],string.len(List[i])-3,string.len(List[3]))
- if Tag == ".txt" then
- local file = fs.open(fs.combine(Path,List[i])),"r")
- local Data = {}
- Data[1] = file.readLine()
- Data[2] = file.readLine()
- Data[3] = file.readLine()
- Data[4] = file.readLine()
- file.close()
- Applications_Desktop[#Applications_Desktop + 1] = Data
- end
- end
- end
- function Loop()
- while true do
- Tabs = {fs.list("os/Tasks")}
- if DrawLayers[1] == true then DrawLayer1() end
- if DrawLayers[2] == true then DrawLayer2() end
- if DrawLayers[3] == true then DrawLayer3() end
- if DrawLayers[4] == true then DrawLayer4() end
- local a, b, c, d, e = os.pullEvent()
- if a == "key" then
- elseif a == "application" then
- elseif a == "mouse_click" then
- elseif a == "mouse_drag" then
- elseif a == "modem_message" then
- end
- end
- end
- getApplications()
- Loop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement