Fix loading of old saves.
[naja.git] / naja / scenes / win.py
index 65765d769014ca38abadb5fa42c4db605ec1cc0c..f14034a822ba5279aee6e0284f07ad9829af423c 100644 (file)
@@ -4,10 +4,11 @@ Win scene.
 
 import pygame.locals as pgl
 
-from naja.constants import KEYS
+from naja.constants import KEYS, PALETTE
+from naja.events import QuitGameEvent
+from naja.options import options
 from naja.scenes.scene import Scene
 from naja.widgets.text import TextWidget, TextBoxWidget
-from naja.events import QuitGameEvent
 
 
 class WinScene(Scene):
@@ -17,17 +18,19 @@ class WinScene(Scene):
 
     def __init__(self, state):
         super(WinScene, self).__init__(state)
-        self.add(TextWidget(
-            (480, 160), 'You won!', fontsize=32, colour='white'))
+        self.add(TextWidget((50, 50), 'You won!', colour=PALETTE.WHITE))
+        if options.cheat_enabled:
+            self.add(TextWidget(
+                (50 + 64, 50), 'CHEATER!', colour=PALETTE.ORANGE))
         self.add(TextBoxWidget(
-            (120, 30), '\n'.join([
+            (50, 100), '\n'.join([
                 "You're great.",
                 "You did well.",
                 "You should be proud of yourself.",
-            ]), fontsize=32,
-            colour='white', padding=1, border=1,
-            bg_colour='black', border_colour='black',
-            box_width=100))
+            ]),
+            colour=PALETTE.WHITE, padding=1, border=1,
+            bg_colour=PALETTE.BLACK, border_colour=PALETTE.BLACK,
+            box_width=300))
 
     def handle_scene_event(self, ev):
         if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT: