6 import pygame.locals as pgl
8 from naja.constants import KEYS
9 from naja.scenes.scene import Scene
10 from naja.widgets.text import TextWidget, TextBoxWidget
11 from naja.widgets.image_box import ImageBox
12 from naja.events import SceneChangeEvent
15 class CreditsScene(Scene):
17 List those responsible.
20 def __init__(self, state):
21 super(CreditsScene, self).__init__(state)
23 background = ImageBox(
24 (0, 0), "screens/splash.png")
27 (400, 300), 'CREDITS', colour='white', centre=True))
29 self.add(TextBoxWidget(
30 (400, 340), '\n'.join([
31 'A game about robots and bits and other things',
35 u'Adrianna PiĆska, David Sharpe, Jeremy Thurgood, '
36 u'Neil Muller, Simon Cross & Stefano Rivera',
38 'Music by Rolemusic:',
39 'http://rolemusic.sawsquarenoise.com/',
41 'Press ESC to return to the menu.',
43 colour='white', padding=1,
44 bg_colour=(0, 0, 0, 0), centre=True,
45 box_width=780, view_port=(780, 250)))
47 def handle_scene_event(self, ev):
48 if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT:
49 from naja.scenes.menu import MenuScene
50 SceneChangeEvent.post(MenuScene)