Advertisement
xerpi

Untitled

Jun 21st, 2011
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. menu={}
  2. for i = 1,5 do
  3.     menu[i] = image.load("System/Imagenes/Menu/menu"..i..".png")
  4. end
  5.  
  6. fondo1 = image.load("System/Imagenes/Fondos/pantallawait.png")
  7. fondo2 = image.load("System/Imagenes/Fondos/pantallacs.png")
  8. fondo3 = image.load("System/Imagenes/Fondos/creditos.png")
  9. sonido1 = sound.load("System/Sonidos/nyansong.mp3")
  10.  
  11. current = 1
  12. current2 = 5
  13.  
  14. sound.play(sonido1)
  15.  
  16. dofile("System/System/splash.lua")
  17. splash("System/Imagenes/Fondos/pantallawait.png",2000,3)
  18.  
  19. while true do
  20. controls.read()
  21. menu[current]:blit(0,0)
  22.  
  23. if controls.press("up") then
  24.     if current<=1 then current=5 else current = current - 1 end
  25. elseif controls.press("down") then
  26.     if current >=5 then current = 1 else current = current + 1 end
  27. end
  28.  
  29. if controls.press("cross") then
  30.     if current == 1 then
  31.         os.message("construccion")
  32.     elseif current == 2 then
  33.         os.message("construccion")
  34.     elseif current == 3 then
  35.         while true do
  36.         controls.read()
  37.         tuimagen:blit(0,0)
  38.         if controls.press("cross") or controls.press("circle") then break end
  39.         screen.flip()
  40.         end
  41.     elseif current == 4 then
  42.         os.message("construccion")
  43.     elseif current == 5 then
  44.         os.quit()
  45.     end
  46. end
  47. screen.flip()
  48. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement