Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local nastaveni={barva=colors.blue}
- local f=fs.open("system/.core/colors","r")
- local cnt=f.readAll()
- f.close()
- local nastaveni=textutils.unserialize(cnt)
- local f=fs.open("system/.core/textcol","r")
- local tnt=f.readAll()
- f.close()
- local text=textutils.unserialize(tnt)
- local propojeni = ""
- local function prc(text, y)
- local w = term.getSize()
- local _, cy = term.getCursorPos()
- term.setCursorPos(math.ceil((w-#text)/2), y or cy)
- write(text)
- end
- function start ()
- term.setBackgroundColor(colors.magenta)
- term.setTextColor(colors.white)
- term.clear ()
- local image = paintutils.loadImage("/system/programs/setdata/Ikon.nft")
- paintutils.drawImage(image, 18, 4)
- prc ("Setting", 16)
- o=fs.open ("/system/RAM/setting", "r")
- user=o.readLine()
- passI=o.readLine()
- o.close()
- sleep (1)
- setupmenu ()
- end
- function store ()
- funkce = "apps"
- term.setBackgroundColor(nastaveni.barva)
- term.setCursorPos(1,1)
- print " "
- paintutils.drawPixel(16, 1, colors.gray)
- local myWindow = window.create(term.current(),17,1,37,19)
- myWindow.setBackgroundColor(colors.white)
- myWindow.clear()
- term.setTextColor(colors.black)
- term.setBackgroundColor(colors.lightBlue)
- myWindow.setCursorPos (9,2)
- print " App Store Pepdroll "
- term.setBackgroundColor(colors.green)
- myWindow.setCursorPos (4,4)
- print " - Downloader "
- myWindow.setCursorPos (4,6)
- print " - Program manager -Alpha "
- while true do
- local event, button, x, y = os.pullEvent("mouse_click")
- xy = x..","..y
- if x >= 2 and x <= 16 and y == 3 and button == 1 then
- setupmenu ()
- elseif x >= 17 and x <= 30 and y == 4 and button == 1 then
- shell.run ("pastebin get WV3VRjQZ /system/programs/downloader")
- shell.run ("/system/programs/downloader")
- store ()
- elseif x >= 17 and x <= 40 and y == 6 and button == 1 then
- shell.run ("pastebin get GUtPPTV3 /system/programs/pmanager")
- shell.run ("/system/programs/pmanager")
- store ()
- elseif x >= 2 and x <= 16 and y == 5 and button == 1 then
- downloader ()
- elseif x >= 2 and x <= 16 and y == 7 and button == 1 then
- setprograms ()
- else
- paintutils.drawLine(1, 1, 51, 1, colors.black)
- paintutils.drawPixel (51,1, colors.red)
- term.setTextColor(colors.white)
- term.setCursorPos (51,1)
- print "*"
- paintutils.drawPixel (50,1, colors.lightGray)
- term.setCursorPos (50,1)
- print "<"
- paintutils.drawPixel (49,1, colors.lightGray)
- term.setCursorPos (49,1)
- print "_"
- while true do
- local event, button, x, y = os.pullEvent("mouse_click")
- xy = x..","..y
- if x == 51 and y == 1 then
- plocha ()
- elseif x == 50 and y == 1 then
- apps ()
- elseif x == 49 and y == 1 then
- minimalizace ()
- else
- store ()
- end
- end
- end
- end
- end
- store ()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement