Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- NextUI Startup --
- 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
- local w, h = term.getSize()
- os.pullEvent = os.pullEventRaw
- sbc(colors.black)
- tc()
- sbc(colors.black)
- a = w/2
- scp(a-3,5)
- sbc(colors.gray)
- stc(colors.white)
- p("NextUI")
- scp(a-9,10)
- sbc(colors.blue)
- stc(colors.blue)
- sp("000000000000000000", 14)
- s(1)
- if fse("/os/.19") then
- tSides = {"left","right","bottom","top","front","back"}
- for i = 1, #tSides do
- monitor = peripheral.wrap(tSides[i])
- if monitor then
- side = tSides[i]
- break
- end
- end
- if monitor then
- tc()
- pfb(1,1,w,h,colors.black)
- stc(colors.white)
- scp(1,1)
- p("Wykryto ekran zewnetrzny.")
- p("Wybierz 1 aby uzyc go jako wyswietlacza NextUI")
- write(".>")
- wybor = read()
- if wybor == "1" then r("monitor", side, "/os/.next")
- else r("/os/.next")
- end
- else
- if fse("/.microcraft") then
- tc()
- scp(1,1)
- sbc(colors.black)
- tc()
- sbc(colors.black)
- stc(colors.white)
- p("MICROCRAFT BOOTLOADER DETECTED")
- p("Booting into Microcraft BIOS")
- s(1)
- r(".microcraft")
- else
- r("/os/.next")
- end
- end
- else
- if fse("/.microcraft") then
- tc()
- scp(1,1)
- sbc(colors.black)
- tc()
- sbc(colors.black)
- stc(colors.white)
- p("MICROCRAFT BOOTLOADER DETECTED")
- p("Booting into Microcraft BIOS")
- s(1)
- r(".microcraft")
- else
- r("/os/.next")
- end
- end
Add Comment
Please, Sign In to add comment