X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fscenes%2Fcredits.py;h=75f1b3ce5ada6d6b13cd638770b869c732c1cf07;hb=51c21cef44d0a7f3cb59f4a005d4a1dba9159d51;hp=f50d9e1cf178cb9873a04fd4e6101b53f9284204;hpb=984e7cd78f747a58960c31c8c8866941d75701d0;p=naja.git diff --git a/naja/scenes/credits.py b/naja/scenes/credits.py index f50d9e1..75f1b3c 100644 --- a/naja/scenes/credits.py +++ b/naja/scenes/credits.py @@ -1,35 +1,51 @@ +# coding: UTF-8 """ -Main menu scene. +Credits scene. """ 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 class CreditsScene(Scene): - - base_menu = None + """ + List those responsible. + """ def __init__(self, state): super(CreditsScene, self).__init__(state) - self.add(TextWidget((360, 160), 'Credits', fontsize=32, - colour='white')) - self.add(TextBoxWidget((120, 30), - 'Your mom ' - 'A stranger \n' - 'A \n' - 'bag full of snakes\n' - 'A host of really bored bronies\n' - 'And FIVE GOLDEN RIIIIINGS!', fontsize=32, - colour='white', padding=1, border=1, - bg_colour='black', border_colour='black', - box_width=100)) + + background = ImageBox( + (0, 0), "screens/splash.png") + self.add(background) + self.add(TextWidget( + (400, 300), 'CREDITS', colour='white', centre=True)) + + self.add(TextBoxWidget( + (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', + '', + 'Music by Rolemusic:', + 'http://rolemusic.sawsquarenoise.com/', + '', + '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.KEYUP and ev.key in (pgl.K_q, pgl.K_ESCAPE): + if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT: from naja.scenes.menu import MenuScene SceneChangeEvent.post(MenuScene) return