Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. menuStat = 0
  2.  
  3. repeat
  4.  
  5.  
  6. term.clear() -- Clear the screen
  7. term.setCursorPos(1,1) -- Set the cursor pos
  8.  
  9. print "Select your langauge" -- Message to print above the menu
  10.  
  11. pressedOk = false
  12.  
  13. if menuStat == 1 then
  14. print[[> Francais - French]] -- Text to show if the cursor is on the first choice
  15. print[[ English - Anglais]]
  16. elseif menuStat == 2 then
  17. print[[ Francais - French]] -- Text to show if the cursor is on the second choice
  18. print[[> English - Anglais]]
  19. end
  20.  
  21. event, param1 = os.pullEvent("key")
  22. if param1 == 208 then menuStat = menuStat + 1
  23. elseif param1 == 200 then menuStat = menuStat - 1
  24. elseif param1 == 28 then pressedOk = true end
  25. if menuStat == 3 then menuStat = 1
  26. elseif menuStat == 0 then menuStat = 2 end
  27. until pressedOk == true
  28. menuStat = tostring(menuStat)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement