Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- print("##############################")
- term.setCursorPos(1,2)
- function drawMenu()
- term.setCursorPos(1,13)
- print("Command ")
- term.setCursorPos(1,15)
- print("Ports ")
- term.setCursorPos(1,17)
- print("Unavailable ")
- end
- function drawOption1()
- term.setCursorPos(1,13)
- print("[Command]")
- end
- function drawOption2()
- term.setCursorPos(1,15)
- print("[Ports]")
- end
- function drawOption3()
- term.setCursorPos(1,17)
- print("[Unavailable]")
- end
- print(" ___ __ ")
- print(" / | _____/ /_ ")
- print(" / /| | / ___/ __ \\")
- print(" / ___ |(__ ) / / /")
- print("/_/ |_/____/_/ /_/ 1.0.2")
- drawMenu()
- term.setCursorPos(1,13)
- print("[Command]")
- term.setCursorPos(1,8)
- print("##############################")
- print("Main Menu")
- print("Pick a page to go to.")
- print("######################")
- term.setCursorPos(1,12)
- local buttonNum = -1
- while true do
- local event, key, isHeld = os.pullEvent("key")
- if key == keys.up then
- if buttonNum >= -1 then
- buttonNum = buttonNum - 1
- end
- end
- if key == keys.down then
- if buttonNum <= -1 then
- buttonNum = buttonNum + 1
- end
- end
- if key == keys.enter then
- if buttonNum == -1 then
- shell.run(".command")
- break
- elseif buttonNum == 0 then
- shell.run(".PortConnectionLost")
- break
- end
- end
- if buttonNum == -1 then
- drawMenu()
- drawOption1()
- elseif buttonNum == 0 then
- drawMenu()
- drawOption2()
- elseif buttonNum == 1 then
- drawMenu()
- drawOption3()
- end
- end
Add Comment
Please, Sign In to add comment