mainmenu.rb 622 B

123456789101112131415161718192021222324252627282930
  1. class MainMenu
  2. attr_accessor :active
  3. def load
  4. @main_music = Store.load_audio_stream('/music/hiver_com64.ogg')
  5. @main_back = Store.load_bitmap('/image/background/eruta_mainmenu.png')
  6. @main_graph = Graph.make_image(0, 0, @main_back.id)
  7. Eruta::Audio.music_id = @main_music.id
  8. # res = Eruta::Audio.play_music
  9. # puts "play_music #{res} #{@main_music.id}"
  10. end
  11. def initialize()
  12. @active = true
  13. load
  14. end
  15. def done
  16. # Need some more engine functionality here...
  17. end
  18. def on_poll(*args)
  19. return false if(!@active)
  20. p "args: #{args}"
  21. return true
  22. end
  23. end