Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArg = {...}
- local w, h = term.getSize()
- local Shortcuts = {}
- local TaskbarItems = {}
- local TabsSaved = {}
- local function Clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- function DrawDesktop()
- term.setBackgroundColor(colors.black)
- Clear()
- paintutils.drawBox(1,h,w,h,colors.lightGray)
- paintutils.drawBox(w - 6, h, w, h, colors.white)
- term.setBackgroundColor(colors.black)
- end
- function DrawShortcuts()
- end
- function DrawTaskbarItems()
- end
- function DrawTab()
- paintutils.drawFilledBox(1,1,w,h - 1,colors.white)
- paintutils.drawbox(1,1,w,1, colors.lightGray)
- paintutils.drawBox(w,1,w,1,colors.red)
- paintutils.drawBox(w - 1, 1, w - 1, 1, colors.blue)
- term.setBackgroundColor(colors.white)
- term.setTextColor(colors.black)
- term.setCursorPos(1,2)
- end
- function OpenDesktop()
- DrawDesktop()
- DrawShortcuts()
- DrawTaskBarItems()
- DesktopControl()
- end
- function DesktopControl()
- end
- function TabControl()
- local n = 0
- local a, b, c, d
- while true do
- a, b, c, d = os.pullEvent("mouse_click")
- if d == 1 then
- if c == w then n = 1 end
- if c == w - 1 then n = 2 end
- elseif d == h then
- if c > w - 7 then n = 3 else n = 4 end
- end
- if d >= 2 and d <= h - 1 then n = 5 end
- if n > 0 then break end
- end
- if n == 1 then
- OpenDesktop()
- elseif n == 2 then
- TabsSaved[#TabsSaved + 1] = tArg[1]
- OpenDesktop()
- elseif n == 3 then
- elseif n == 4 then
- elseif n == 5 then
- shell.run(,"click",c,d)
- TabControl()
- end
- end
- DrawDesktop()
- if tArg[1] == "Desktop" then
- OpenDesktop()
- else
- DrawTaskbarItems()
- DrawTab()
- TabControl()
- end
Add Comment
Please, Sign In to add comment