Advertisement
Guest User

Untitled

a guest
Mar 9th, 2013
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. menu = 1
  2.  
  3. function love.keypressed(key)
  4.     if key == "up" then
  5.         menu = menu - 1
  6.     elseif key == "down" then
  7.         menu = menu + 1
  8.     end
  9.  
  10. end
  11.  
  12. function love.draw()
  13.    
  14.     love.graphics.setColor(0, 0, 255)
  15.     if menu == 1 then
  16.         love.graphics.setColor(255, 0, 0)
  17.         love.graphics.draw(cursor, 300, 200)
  18.     end
  19.     love.graphics.print("Idioma", 320, 200, 0, 2, 2)
  20.    
  21.  
  22.     love.graphics.setColor(0, 0, 255)
  23.     if menu == 2 then
  24.         love.graphics.setColor(255, 0, 0)
  25.         love.graphics.draw(cursor, 300, 300)
  26.     end
  27.     love.graphics.print("Musica", 320, 300, 0, 2, 2)
  28.    
  29.    
  30.     love.graphics.setColor(0, 0, 255)
  31.     if menu == 3 then
  32.         love.graphics.setColor(255, 0, 0)
  33.         love.graphics.draw(cursor, 300, 400)
  34.     end
  35.     love.graphics.print("Color del jugador", 320, 400, 0, 2, 2)
  36.  
  37.  
  38. end
  39.  
  40. function love.update()
  41.  
  42.     if menu > 3 then
  43.         menu = 1
  44.     elseif menu < 1 then
  45.         menu = 3
  46.     end
  47.    
  48.     if love.keyboard.isDown("escape") then
  49.         require("menu1")
  50.     end
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement