Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- X = window.create(term.current(),2,1,18,11)
- X.setBackgroundColor(colors.blue)
- X.clear()
- end
- function frameOne()
- X.clear()
- X.setCursorPos(2,2)
- X.setBackgroundColor(colors.blue)
- X.write("CMD ")
- X.setCursorPos(2,3)
- X.setBackgroundColor(colors.gray)
- X.write("BunnyPath ")
- X.setCursorPos(2,4)
- X.write("Path Select")
- X.setCursorPos(2,5)
- X.write("Run ")
- X.setCursorPos(2,6)
- X.write("Exit ")
- end
- function frameTwo()
- X.clear()
- X.setCursorPos(2,2)
- X.write("CMD ")
- X.setCursorPos(2,3)
- X.setBackgroundColor(colors.blue)
- X.write("BunnyPath ")
- X.setCursorPos(2,4)
- X.setBackgroundColor(colors.gray)
- X.write("Path Select")
- X.setCursorPos(2,5)
- X.write("Run ")
- X.setCursorPos(2,6)
- X.write("Exit ")
- end
- function frameThree()
- X.clear()
- X.setCursorPos(2,2)
- X.write("CMD ")
- X.setCursorPos(2,3)
- X.write("BunnyPath ")
- X.setCursorPos(2,4)
- X.setBackgroundColor(colors.blue)
- X.write("Path Select")
- X.setBackgroundColor(colors.gray)
- X.setCursorPos(2,5)
- X.write("Run ")
- X.setCursorPos(2,6)
- X.write("Exit ")
- end
- function frameFour()
- X.clear()
- X.setCursorPos(2,2)
- X.write("CMD ")
- X.setCursorPos(2,3)
- X.write("BunnyPath ")
- X.setCursorPos(2,4)
- X.write("Path Select")
- X.setCursorPos(2,5)
- X.setBackgroundColor(colors.blue)
- X.write("Run ")
- X.setBackgroundColor(colors.gray)
- X.setCursorPos(2,6)
- X.write("Exit ")
- end
- function frameFive()
- X.clear()
- X.setCursorPos(2,2)
- X.write("CMD ")
- X.setCursorPos(2,3)
- X.write("BunnyPath ")
- X.setCursorPos(2,4)
- X.write("Path Select")
- X.setCursorPos(2,5)
- X.write("Run ")
- X.setBackgroundColor(colors.blue)
- X.setCursorPos(2,6)
- X.write("Exit ")
- X.setBackgroundColor(colors.gray)
- end
- on = true
- ref = 0
- frameOne()
- while on do
- local event, key = os.pullEvent( "key" )
- if key == keys.up then
- if Ref == 1 then
- Ref = Ref - 1
- frameOne()
- elseif Ref == 2 then
- Ref = Ref - 1
- frameTwo()
- elseif Ref == 3 then
- Ref = Ref - 1
- frameThree()
- elseif Ref == 4 then
- Ref = Ref - 1
- frameFour()
- end
- elseif key == keys.down then
- if Ref == 0 then
- Ref = Ref + 1
- frameTwo()
- elseif Ref == 1 then
- Ref = Ref + 1
- frameThree()
- elseif Ref == 2 then
- Ref = Ref + 1
- frameFour()
- elseif Ref == 3 then
- Ref = Ref + 1
- frameFive()
- end
- elseif key == keys.enter then
- if Ref == 0 then
- exit()
- elseif Ref == 1 then
- shell.run("BunnyPath")
- elseif Ref == 2 then
- print("Incomplete")
- elseif Ref == 3 then
- print("Incomplete")
- elseif Ref == 4 then
- exit()
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement