Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 2nd, 2013  |  syntax: None  |  size: 0.79 KB  |  views: 34  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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)