Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local verze = "20.0319.3"
- local anim = 0.1
- local RamCesta = ("/C/system/RAM/SMB")
- local w, h = term.getSize()
- ----------------------------------------------------
- local f=fs.open("/C/system/RAM/user","r")
- user=f.readLine()
- pass=f.readLine()
- Fname=f.readLine()
- Lname=f.readLine()
- f.close()
- ----------------------------------------------------
- local f=fs.open("/C/system/Users/"..user.."/colors","r")
- local cnt=f.readAll()
- f.close()
- local nastaveni=textutils.unserialize(cnt)
- ----------------------------------------------------
- local f=fs.open("/C/system/Users/"..user.."/textcol","r")
- local tnt=f.readAll()
- f.close()
- local text=textutils.unserialize(tnt)
- ----------------------------------------------------
- function ukonceni ()
- fs.delete (RamCesta)
- os.exit()
- end
- function cbarva()
- lista.setTextColor(colors.black)
- lista.setBackgroundColor(colors.gray)
- end
- function defaultvalue()
- end
- function start()
- defaultvalue()
- local myWindow = window.create(term.current(),w/2-11,h/2-5,25,9)
- myWindow.setBackgroundColor(colors.yellow)
- myWindow.setTextColor(colors.black)
- myWindow.clear()
- myWindow.setCursorPos (8, 5)
- myWindow.write"SaMBa Manager"
- myWindow.setCursorPos (8, 6)
- myWindow.write" (Alpha) "
- myWindow.setCursorPos (1, 1)
- myWindow.write"Pepek@Soft"
- myWindow.setCursorPos (22, 9)
- myWindow.write"2020"
- sleep(1)
- menu()
- end
- function plocha()
- w, h = term.getSize()
- paintutils.drawLine(1, 1, 51, 1, nastaveni.barva)
- paintutils.drawPixel (51,1, colors.red)
- term.setCursorPos (51,1)
- term.setTextColor(text.barva)
- write "*"
- barW = window.create(term.current(),1,2,w,1)
- barW.setBackgroundColor(colors.gray)
- barW.clear()
- barW.setTextColor(colors.white)
- barW.setCursorPos(2,1)
- barW.write"Samba Manager >"
- pozadi = window.create(term.current(),13,3,w,h-2)
- pozadi.setBackgroundColor(colors.white)
- pozadi.setTextColor(colors.black)
- pozadi.clear()
- lista = window.create(term.current(),1,3,12,h-2)
- lista.setBackgroundColor(nastaveni.barva)
- lista.setTextColor(text.barva)
- lista.clear()
- lista.setCursorPos(2,3)
- lista.write"Dashboard"
- lista.setCursorPos(2,h-2)
- lista.setTextColor(colors.white)
- lista.write("Pepek@Soft")
- term.setBackgroundColor(colors.lightGray)
- end
- -----------------------------------------------------------------------------
- local page = "main"
- function main()
- barW.setCursorPos(19,1)
- barW.write"Dashboard"
- pozadi.setCursorPos(2,2)
- pozadi.write"it Will be Soon,"
- pozadi.setCursorPos(2,3)
- pozadi.write"we are working on development"
- end
- function menu()
- plocha()
- if (page == "main") then
- main ()
- end
- while true do
- local event, button, x, y = os.pullEvent("mouse_click")
- xy = x..","..y
- if event == "mouse_click" and x >= 2 and x <= 12 and y == 5 then
- cbarva()
- lista.setCursorPos(1,3)--
- lista.write" Dashboard "
- sleep(anim)
- page = "main"
- menu()
- end
- if x == 51 and y == 1 then
- ukonceni ()
- else
- menu() -------- stejne jako nazev funkce
- end
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement