local function s(...) return sleep(...) end local function aw(...) return write(...) end local function p(...) return print(...) end local function tw(...) return term.write(...) end local function scp(...) return term.setCursorPos(...) end local function sbc(...) return term.setBackgroundColor(...) end local function stc(...) return term.setTextColor(...) end local function tc(...) return term.clear(...) end local function tcl(...) return term.clearLine(...) end local function r(...) return shell.run(...) end local function sp(...) return textutils.slowPrint(...) end local function sw(...) return textutils.slowWrite(...) end local function fse(...) return fs.exists(...) end local function pul(...) return paintutils.loadImage(...) end local function pud(...) return paintutils.drawImage(...) end local function pfb(...) return paintutils.drawFilledBox(...) end local function su(...) return os.shutdown(...) end local function re(...) return os.reboot(...) end local function pdp(...) return paintutils.drawPixel(...) end os.loadAPI("nextapis/explorer") function draw() pfb(1,2,w,h-1,colors.cyan) pfb(1,1,w,1,colors.black) pfb(1,h,5,h,colors.black) stc(colors.white) scp(1,h) write("Start") scp(1,1) p("NextUI 2.0 Beta") pfb(6,h,w,h,colors.blue) pdp(w,h,colors.red) pdp(w-1,h,colors.orange) sbc(colors.cyan) stc(colors.yellow) scp(2,3) p("[[Aplikacje]]") if fse("/User") then stc(colors.yellow) scp(2,4) p("[[User]]") end if fse("/nshop") then stc(colors.yellow) scp(2,5) p("[[nshop]]") end end function mysz() local event, button, x, y = os.pullEvent("mouse_click") klik = {x, y, button} return klik end function start() pfb(1,h-3,15,h-3,colors.white) scp(1,h-3) stc(colors.black) p("Explorer") pfb(1,h-2,15,h-1,colors.black) scp(1,h-2) sbc(colors.black) stc(colors.white) print[[nextStore Ustawienia]] klik = mysz() if (klik[1]>0 and klik[1]<16 and klik[2] == h-2) then r("pastebin run 7qMxuP59") end if (klik[1]>0 and klik[1]<16 and klik[2] == h-1) then ustawienia() end if (klik[1]>1 and klik[1]<20 and klik[2] == h-3) then r("/os/main/explorer") end end function ustawienia() while true do pfb(1,1,w,1,colors.blue) stc(colors.white) scp(1,1) p("Ustawienia NextUI") pfb(6,h,w,h,colors.blue) pfb(1,h,5,h,colors.black) scp(1,h) stc(colors.white) write("Start") pdp(w,1,colors.red) pfb(1,2,w,h-1,colors.black) pdp(w,h,colors.red) pdp(w-1,h,colors.orange) klik = mysz() if (klik[1] == w and klik[2] == 1) then break end end end function sys() draw() klik = mysz() scp(1,1) if (klik[1]>1 and klik[1]<20 and klik[2] == 3) then r("/os/main/explorer", "/os") end if fse("/User") and fs.isDir("/User") and (klik[1]>1 and klik[1]<20 and klik[2] == 4) then r("/os/main/explorer", "/User") end if fse("/nshop") and fs.isDir("/nshop") and (klik[1]>1 and klik[1]<20 and klik[2] == 5) then r("/os/main/explorer", "/nshop") end if (klik[1] == w-1 and klik[2] == h) then re() end if (klik[1] == w and klik[2] == h) then se() end if (klik[1]>0 and klik[1]<6 and klik[2] == h) then start() end end while true do w, h = term.getSize() sys() end