Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function s(...) return sleep(...) end
- local function w(...) 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
- function ustawienia()
- while true do
- pfb(1, 2, 26, 20, colors.black)
- pfb(1, 2, 26, 2, colors.white)
- pdp(26,2, colors.red)
- sbc(colors.white)
- stc(colors.black)
- scp(1,2)
- p("Ustawienia NextUI")
- sbc(colors.black)
- stc(colors.white)
- p("System NextUI Mobile 1.0")
- p("Zmien nazwe urzadzenia")
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == 26 and y == 2 then system() end
- if x>0 and x<27 and y == 4 then
- scp(1,5)
- w("Wpisz nowa nazwe: ")
- nazwa = read()
- os.setComputerLabel(nazwa)
- ustawienia()
- end
- end
- end
- function obraz()
- tc()
- pfb(1, 2, 26, 20, colors.cyan)
- pdp(25, 20, colors.orange)
- pdp(26, 20, colors.red)
- scp(1,1)
- sbc(colors.blue)
- stc(colors.white)
- p("NextUI Mobile. Microcraft ")
- sbc(colors.green)
- scp(7,20)
- w("Start")
- scp(13,20)
- w("Ustawienia")
- end
- function mysz1()
- local event, click, x, y = os.pullEvent("mouse_click")
- if x == 25 and y == 20 then re() end
- if x == 26 and y == 20 then su() end
- if x>6 and x<13 and y == 20 then aplikacje() end
- if x>13 and x<24 and y == 20 then ustawienia() end
- end
- function aplikacje()
- while true do
- pfb(1, 2, 26, 20, colors.black)
- pfb(1, 2, 26, 2, colors.white)
- scp(1,2)
- stc(colors.black)
- p("Aplikacje NextUI")
- pdp(26,1, colors.red)
- pfb(2, 4, 3, 5, colors.green)
- scp(2,6)
- sbc(colors.black)
- stc(colors.white)
- p("Tetris")
- local event, click, x, y = os.pullEvent("mouse_click")
- if x>1 and x<4 and y>3 and y<6 then r("falling") end
- if x == 26 and y == 1 then system() end
- end
- end
- function system()
- while true do
- obraz()
- mysz1()
- end
- end
- system()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement