Fucking megres
authorDavid Sharpe <decoydavid@gmail.com>
Sun, 11 May 2014 16:58:38 +0000 (18:58 +0200)
committerDavid Sharpe <decoydavid@gmail.com>
Sun, 11 May 2014 16:58:38 +0000 (18:58 +0200)
1  2 
naja/scenes/credits.py
naja/scenes/menu.py

index cd3ad5838ca75229620c02b4a960e678a41ce4d9,0000000000000000000000000000000000000000..3f592df886d4e47cba49c431c61401e448aadc7f
mode 100644,000000..100644
--- /dev/null
@@@ -1,27 -1,0 +1,30 @@@
 +"""
 +Main menu scene.
 +"""
 +
 +import pygame.locals as pgl
 +
 +from naja.scenes.scene import Scene
 +from naja.widgets.text import TextWidget
 +from naja.events import SceneChangeEvent
 +
-         self.widgets.append(TextWidget((10, 10), 'Credits',
-                             colour=(255, 255, 255)))
 +class CreditsScene(Scene):
 +
 +    base_menu = None
 +
 +    def __init__(self):
 +        super(CreditsScene, self).__init__()
-     def set_base_menu(self, base_menu):
-         self.base_menu = base_menu
++        self.widgets.append(TextWidget((60, 10), 'Credits', fontsize=32,
++                            colour='white'))
++        self.widgets.append(TextWidget((60, 30),
++                                       'Your mom\n'
++                                       'A stranger', fontsize=32,
++                            colour='white'))
 +
-             SceneChangeEvent.post(self.base_menu)
 +
 +    def handle_event(self, ev):
 +        if ev.type == pgl.KEYUP and ev.key in (pgl.K_q, pgl.K_ESCAPE):
++            from naja.scenes.menu import MenuScene
++            menu_scene = MenuScene()
++            SceneChangeEvent.post(menu_scene)
 +            return
index b17f611234253b5ad9b69f1aacd1aebcf34eb5d9,771cf33318cd8b227b0a534ac9fc06939036291d..96c8c7a5677e8374458a1f2d1694d0209f6d274a
@@@ -24,6 -20,3 +21,7 @@@ class MenuScene(Scene)
          if ev.type == pgl.KEYUP and ev.key in (pgl.K_q, pgl.K_ESCAPE):
              QuitGameEvent.post()
              return
-             SceneChangeEvent.post(self.credits_menu)
 +        if ev.type == pgl.KEYUP and ev.key is pgl.K_RETURN:
++            credits_menu = CreditsScene()
++            SceneChangeEvent.post(credits_menu)
 +            return