Out of credits.
[naja.git] / naja / scenes / credits.py
index 05493dd1f436224d3ab43357575dcfd7da906f5e..a522c986c1207ba6a97e7e84bac9bb56475eaabe 100644 (file)
@@ -1,3 +1,4 @@
+# coding: UTF-8
 """
 Credits scene.
 """
@@ -7,6 +8,7 @@ import pygame.locals as pgl
 from naja.constants import KEYS
 from naja.scenes.scene import Scene
 from naja.widgets.text import TextWidget, TextBoxWidget
+from naja.widgets.image_box import ImageBox
 from naja.events import SceneChangeEvent
 
 
@@ -17,25 +19,36 @@ class CreditsScene(Scene):
 
     def __init__(self, state):
         super(CreditsScene, self).__init__(state)
+
+        background = ImageBox(
+            (0, 0), "screens/splash.png")
+        self.add(background)
         self.add(TextWidget(
-            (400, 30), 'Credits', fontsize=32, colour='white', centre=True))
-        self.add(TextWidget(
-            (400, 80), 'A game about robots and bits and other things',
-            fontsize=32, colour='white', centre=True))
-        self.add(TextWidget(
-            (400, 120), 'by', fontsize=32, colour='white', centre=True))
-        self.add(TextBoxWidget(
-            (20, 160), 'Adrianna Pinska, David Sharpe, Jeremy Thurgood, '
-            'Neil Muller, Simon Cross & Stefano Rivera',
-            fontsize=32, colour='white', padding=1, border=1,
-            bg_colour='black', border_colour='black',
-            box_width=320))
+            (400, 300), 'CREDITS', colour='white', centre=True))
+
         self.add(TextBoxWidget(
-            (30, 280),
-            'Music by Rolemusic: http://rolemusic.sawsquarenoise.com/',
-            fontsize=32, colour='white', padding=1, border=1,
-            bg_colour='black', border_colour='black',
-            box_width=320))
+            (400, 340), '\n'.join([
+                'A game about robots and bits and other things',
+                '',
+                'by',
+                '',
+                u'Adrianna PiƄska, David Sharpe, Jeremy Thurgood, '
+                u'Neil Muller, Simon Cross & Stefano Rivera',
+                '',
+                'Special thanks to:',
+                '',
+                'Desilu Crossman',
+                'for snacks and tutorial inspiration',
+                '',
+                'Music by Rolemusic:',
+                'http://rolemusic.sawsquarenoise.com/',
+                '',
+                'Out of credits. Insert coin.',
+                '(Press ESC to return to the menu.)',
+            ]),
+            colour='white', padding=1,
+            bg_colour=(0, 0, 0, 0), centre=True,
+            box_width=780, view_port=(780, 250)))
 
     def handle_scene_event(self, ev):
         if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT: