Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. options = {
  2. "Something", "2", "3"
  3. }
  4. current = 1
  5.  
  6. -- in update:
  7.  
  8. if btnp(2) then
  9. current = (current - 1) % #options
  10. elseif btnp(3) then
  11. current = (current + 1) % #options
  12. elseif btnp(4) then
  13. if current == 1 then
  14. something()
  15. elseif current == 2 then
  16. something()
  17. elseif current == 3 then
  18. something()
  19. end
  20. end
  21.  
  22. -- in draw:
  23.  
  24. for i=1,#options do
  25. local o=options[i]
  26. oprint(o, 1, i * 8 + 1, i == current and 7 or 5) -- tmp
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement