Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- opcje = {}
- wybor = 1
- opcje[1] = "Ja "
- opcje[2] = "Nein"
- function uruchom(numer)
- if numer == 1 then
- shell.run("/disk/laby/deinstall")
- end
- if numer == 2 then
- shell.run("/disk/Laby/setup")
- end
- end
- function Taste()
- sleep(0)
- event, argument = os.pullEvent()
- if event == "key" then
- if argument == 28 then
- return uruchom(wybor)
- elseif argument == 200 then
- if wybor == 1 then
- else
- wybor = wybor - 1
- end
- elseif argument == 208 then
- if wybor == table.getn(opcje) then
- else
- wybor = wybor + 1
- end
- else
- return Taste()
- end
- else
- return Taste()
- end
- return menu()
- end
- function menu()
- shell.run("clear")
- print(" Willkommen im Setup")
- print("---------------------------------------------------")
- print(" LabyOS ist bereits installiern. ")
- print(" Deinstallieren? ")
- print("---------------------------------------------------")
- for i=1, table.getn(opcje) do
- if wybor == i then
- print(" Auswahl> "..opcje[i].." :")
- else
- print(" "..opcje[i].." :")
- end
- end
- print("---------------------------------------------------")
- term.setCursorPos(15,9)
- print("Press Enter to next step")
- return Taste()
- end
- shell.run("clear")
- return menu()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement