Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.86 KB | None | 0 0
  1. fondlvl = Image.load("res/menu.png")
  2. local selecteurlvl = 1
  3.  oldpad = Controls.read()
  4.  
  5. if endroit == "jeu" then
  6.  
  7.  police:setPixelSizes(20,30)
  8.  
  9. screen:clear()
  10. screen:blit(0,0,fondlvl)
  11. pad = Controls.read()
  12.  
  13. screen:fontPrint(police,10,15,"LVL 1",blanc)
  14. screen:fontPrint(police,10,40,"LVL 2",blanc)
  15. screen:fontPrint(police,10,65,"LVL 3",blanc)
  16. screen:fontPrint(police,10,90,"LVL 4",blanc)
  17. screen:fontPrint(police,10,115,"LVL 5",blanc)
  18. screen:fontPrint(police,10,140,"Retourner au Menu",blanc)
  19.  
  20. if pad:up() and not oldpad:up() then selecteurlvl = selecteurlvl - 1 end
  21. if pad:down() and not oldpad:down() then selecteurlvl = selecteurlvl + 1 end
  22.  
  23. if selecteurlvl > 6 then selecteurlvl = 1 end
  24. if selecteurlvl < 1 then selecteurlvl = 6 end
  25.  
  26. if selecteurlvl == 1 then screen:fontPrint(police,10,15,"LVL 1",noir) end
  27. if selecteurlvl == 2 then screen:fontPrint(police,10,40,"LVL 2",noir) end
  28. if selecteurlvl == 3 then screen:fontPrint(police,10,65,"LVL 3",noir) end
  29. if selecteurlvl == 4 then screen:fontPrint(police,10,90,"LVL 4",noir) end
  30. if selecteurlvl == 5 then screen:fontPrint(police,10,115,"LVL 5",noir) end
  31. if selecteurlvl == 6 then screen:fontPrint(police,10,140,"LVL 5",noir) end
  32.  
  33. if pad:cross() and not oldpad:cross() and selecteurlvl == 1 then endroit = "le lvl" end  --creer ton endroit et met le nom tu peux aussi faire des dofiles ou des functions ^^
  34. if pad:cross() and not oldpad:cross() and selecteurlvl == 2 then endroit = "le lvl" end
  35. if pad:cross() and not oldpad:cross() and selecteurlvl == 3 then endroit = "le lvl" end
  36. if pad:cross() and not oldpad:cross() and selecteurlvl == 4 then endroit = "le lvl" end
  37. if pad:cross() and not oldpad:cross() and selecteurlvl == 5 then endroit = "le lvl" end
  38. if pad:cross() and not oldpad:cross() and selecteurlvl == 6 then endroit = "oo" end
  39.  
  40. oldpad = pad
  41. screen.flip()
  42. screen.waitVblankStart()
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement