Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- prompt = prompt or "Continue"
- lOpt = lOpt or "YES"
- rOpt = rOpt or "NO"
- local n = 1
- term.print(prompt)
- while true do
- local x, y =term.getCursor()
- term.clearLine()
- if n==1 then
- term.setCursor(x, y)
- term.clearLine()
- term.write ("["..lOpt.."] "..rOpt)
- else
- term.setCursor(x, y)
- term.clearLine()
- term.write(" "..lOpt.." ["..rOpt.."]")
- end
- term.setCursor(x, y)
- local _,_,_,key = event.pull("key_down")
- if key==203 then n=1 end
- if key==205 then n=2 end
- if key==28 then return n end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement