projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Start folder for puzzle decks.
[naja.git]
/
naja
/
scenes
/
win.py
diff --git
a/naja/scenes/win.py
b/naja/scenes/win.py
index cb3275deee85ac38a0b128a8f6bfc9dbdac683fa..82437d04860a38e90f150607b052a1b2c7a98053 100644
(file)
--- a/
naja/scenes/win.py
+++ b/
naja/scenes/win.py
@@
-5,7
+5,7
@@
Win scene.
import pygame.locals as pgl
from naja.constants import KEYS, PALETTE
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
from naja.sound import sound
from naja.scenes.scene import Scene
from naja.widgets.image_box import ImageBox
@@
-38,11
+38,13
@@
class WinScene(Scene):
colour=PALETTE.WHITE, padding=1, border=1,
bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLACK,
box_width=300))
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()
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
SceneChangeEvent.post(MenuScene)
return