import pygame.locals as pgl
from naja.constants import KEYS, PALETTE
-from naja.events import SceneChangeEvent
+from naja.events import SceneChangeEvent, LoadGameEvent
from naja.sound import sound
from naja.scenes.scene import Scene
from naja.widgets.image_box import ImageBox
colour=PALETTE.WHITE, padding=1, border=1,
bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLACK,
box_width=300))
- sound.play_music('A_ninja.ogg')
+ sound.play_music('A_ninja.ogg', 0.25)
def handle_scene_event(self, ev):
from naja.scenes.menu import MenuScene
if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
sound.stop()
+ # drop current state
+ LoadGameEvent.post(None)
SceneChangeEvent.post(MenuScene)
return