X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=naja%2Fscenes%2Fcredits.py;h=a6ae05d2b6ce1de404332d50fe48cc7a7753b67d;hb=d6b587d8325492b436c4e19f8842f5ae7fccf6a4;hp=67cb4e5a7045facdc7f20acf16d18f96a17c1b6e;hpb=2be70af38592f9eab413e3fe5823cc3e6b00e3de;p=naja.git diff --git a/naja/scenes/credits.py b/naja/scenes/credits.py index 67cb4e5..a6ae05d 100644 --- a/naja/scenes/credits.py +++ b/naja/scenes/credits.py @@ -7,6 +7,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,22 +18,33 @@ 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( - (480, 160), 'Credits', fontsize=32, colour='white')) + (400, 300), 'CREDITS', colour='white', centre=True)) + self.add(TextBoxWidget( - (120, 30), '\n'.join([ - 'Your mom A stranger', - 'A', - 'bag full of snakes', - 'A host of really bored bronies', - 'And FIVE GOLDEN RIIIIINGS!' - ]), fontsize=32, - colour='white', padding=1, border=1, - bg_colour='black', border_colour='black', - box_width=100)) + (400, 340), '\n'.join([ + 'A game about robots and bits and other things', + '', + 'by', + '', + 'Adrianna Pinska, David Sharpe, Jeremy Thurgood, ' + '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 KEYS.QUIT: + if ev.type == pgl.KEYDOWN and ev.key in KEYS.QUIT: from naja.scenes.menu import MenuScene SceneChangeEvent.post(MenuScene) return