from naja.widgets.text import TextWidget
from naja.events import SceneChangeEvent
+
class CreditsScene(Scene):
base_menu = None
'A stranger', fontsize=32,
colour='white'))
-
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)
+ SceneChangeEvent.post(MenuScene)
return
def handle_event(self, ev):
if ev.type == pgl.KEYUP and ev.key in (pgl.K_q, pgl.K_ESCAPE):
- SceneChangeEvent.post(scene=MenuScene())
+ SceneChangeEvent.post(MenuScene)
return
QuitGameEvent.post()
return
if ev.type == pgl.KEYDOWN and ev.key is pgl.K_RETURN:
- credits_menu = CreditsScene()
- SceneChangeEvent.post(credits_menu)
+ SceneChangeEvent.post(CreditsScene)
return