added paragraph spacing to win screen
[naja.git] / naja / scenes / win.py
index f4df54f9858b47b6427c4323c90d81d32f613481..95d931a0b761227ccdb8822da5a090269658ef37 100644 (file)
@@ -5,9 +5,10 @@ Win scene.
 import pygame.locals as pgl
 
 from naja.constants import KEYS, PALETTE
+from naja.events import QuitGameEvent
 from naja.scenes.scene import Scene
+from naja.widgets.image_box import ImageBox
 from naja.widgets.text import TextWidget, TextBoxWidget
-from naja.events import QuitGameEvent
 
 
 class WinScene(Scene):
@@ -17,10 +18,17 @@ class WinScene(Scene):
 
     def __init__(self, state):
         super(WinScene, self).__init__(state)
+
+        background = ImageBox(
+            (0, 0), "screens/you_won.png")
+        self.add(background)
+
         self.add(TextWidget((50, 50), 'You won!', colour=PALETTE.WHITE))
-        self.add(TextWidget((50 + 64, 50), 'CHEATER!', colour=PALETTE.ORANGE))
+        if self.state.gameboard.has_cheated:
+            self.add(TextWidget(
+                (50 + 64, 50), 'CHEATER!', colour=PALETTE.ORANGE))
         self.add(TextBoxWidget(
-            (50, 100), '\n'.join([
+            (50, 100), '\n\n'.join([
                 "You're great.",
                 "You did well.",
                 "You should be proud of yourself.",