Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options = {
- "Something", "2", "3"
- }
- current = 1
- -- in update:
- if btnp(2) then
- current = (current - 1) % #options
- elseif btnp(3) then
- current = (current + 1) % #options
- elseif btnp(4) then
- if current == 1 then
- something()
- elseif current == 2 then
- something()
- elseif current == 3 then
- something()
- end
- end
- -- in draw:
- for i=1,#options do
- local o=options[i]
- oprint(o, 1, i * 8 + 1, i == current and 7 or 5) -- tmp
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement