Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Oprogramowanie skladowe/instalator systemow/czesc skladowa stworzonych przez uzytkownika serwisu Discord - Wisnia#5536 --
- -- Jesli zaplaciles za to oprogramowanie zostales oszukany. --
- -- Zakazuje sie kopiowania oprogramowania bez zgody autora, czerpania korzysci materialnych, podpisywania sie pod oprogramowaniem --
- -- Dozwolone jest tworzenie modyfikacji oprogramowania badz jego czesci wylacznie wtedy, gdy widoczna jest informacja o oryginalnym autorze --
- -- Kompletna EULA dostepna jest na serwerze Discord: CRfXMXU --
- while true do
- os.pullEvent = os.pullEventRaw
- local w,h = term.getSize()
- function printCentered( y,s )
- local x = math.floor((w - string.len(s)) / 2)
- term.setCursorPos(x,y)
- term.clearLine()
- term.write( s )
- end
- local nOption = 1
- local function drawMenu()
- term.clear()
- term.setCursorPos(1,1)
- term.write("Wsparcie dla Minedows 2.0 zostalo ")
- term.setCursorPos(w-11,1)
- if nOption == 1 then
- term.write("zakonczone")
- elseif nOption == 2 then
- term.write("Labirynt")
- elseif nOption == 3 then
- term.write("O i X ")
- elseif nOption == 4 then
- term.write("Ochroniarz")
- elseif nOption == 5 then
- term.write("GraoZyciu")
- elseif nOption == 6 then
- term.write("NaprawOS ")
- elseif nOption == 7 then
- term.write("Powrot do OS")
- else
- end
- end
- --GUI
- local function drawFrontend()
- printCentered( math.floor(h/2) - 3, "")
- printCentered( math.floor(h/2) - 2, "MinedowsMenu v1.0" )
- printCentered( math.floor(h/2) - 1, "")
- printCentered( math.floor(h/2) + 0, ((nOption == 1) and "[ Paint ]") or "Paint" )
- printCentered( math.floor(h/2) + 1, ((nOption == 2) and "[Labirynt ]") or "Labirynt" )
- printCentered( math.floor(h/2) + 2, ((nOption == 3) and "[O i X ]") or "O i X" )
- printCentered( math.floor(h/2) + 4, ((nOption == 4) and "[Ochroniarz]") or "Ochroniarz" )
- printCentered( math.floor(h/2) + 5, ((nOption == 5) and "[GraOZyciu ]") or "GraOZyciu" )
- printCentered( math.floor(h/2) + 6, ((nOption == 6) and "[NaprawOS ]") or "NaprawOS " )
- printCentered( math.floor(h/2) + 7, ((nOption == 7) and "[Powrot ]") or "Powrot " )
- end
- --Display
- drawMenu()
- drawFrontend()
- while true do
- local e,p = os.pullEvent()
- if e == "key" then
- local key = p
- if key == 17 or key == 200 then
- if nOption > 1 then
- nOption = nOption - 1
- drawMenu()
- drawFrontend()
- end
- elseif key == 31 or key == 208 then
- if nOption < 7 then
- nOption = nOption + 1
- drawMenu()
- drawFrontend()
- end
- elseif key == 28 then
- break
- end
- end
- end
- term.clear()
- --Conditions
- if nOption == 1 then
- shell.run("os/.paint 1")
- elseif nOption == 2 then
- shell.run("os/gry/.waz")
- elseif nOption == 3 then
- shell.run("os/gry/.kolkokrzyzyk")
- elseif nOption == 4 then
- shell.run("os/gry/.ochroniarz")
- elseif nOption == 5 then
- shell.run("os/gry/.graozyciu")
- elseif nOption == 6 then
- shell.run(".naprawa")
- elseif nOption == 7 then
- shell.run("os/.menu")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement