X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=tabakrolletjie%2Fscenes%2Fmenu.py;h=ed7cc3194ff34105a08ef3c5c1630f549502502a;hb=9f403d319ac457967248b17a8f3c0de945bdc613;hp=f9658a9c545b84a2fc0a2f0d99b04f9f60a8ec69;hpb=30a1b3797e53d8ed989ca9dc530290a87bce0da0;p=tabakrolletjie.git diff --git a/tabakrolletjie/scenes/menu.py b/tabakrolletjie/scenes/menu.py index f9658a9..ed7cc31 100644 --- a/tabakrolletjie/scenes/menu.py +++ b/tabakrolletjie/scenes/menu.py @@ -1,6 +1,5 @@ """ Menu scene. """ -import pygame.event import pygame.locals as pgl from .base import BaseScene @@ -8,6 +7,11 @@ from ..events import QuitEvent, SceneChangeEvent class MenuScene(BaseScene): + def enter(self, gamestate): + if gamestate.station is None: + print "Loading Station Alpha ..." + gamestate.load_station("station-alpha.json") + def render(self, surface, gamestate): surface.fill((0, 255, 0)) @@ -18,3 +22,9 @@ class MenuScene(BaseScene): elif ev.key == pgl.K_n: from .night import NightScene SceneChangeEvent.post(scene=NightScene()) + elif ev.key == pgl.K_d: + from .day import DayScene + SceneChangeEvent.post(scene=DayScene()) + elif ev.key == pgl.K_l: + print "Loading Station Alpha ..." + gamestate.load_station("station-alpha.json")