Add key to trigger day/night transitions for now
authorNeil <neil@dip.sun.ac.za>
Thu, 8 Sep 2016 17:50:10 +0000 (19:50 +0200)
committerNeil <neil@dip.sun.ac.za>
Thu, 8 Sep 2016 17:50:10 +0000 (19:50 +0200)
tabakrolletjie/scenes/day.py
tabakrolletjie/scenes/night.py

index 7702fc78c07da51057845a487cbbaeffc8a4d4ab..44d352932f5f2c0570eaeb4bed959a2e4cde24a6 100644 (file)
@@ -40,6 +40,9 @@ class DayScene(BaseScene):
             if ev.key in (pgl.K_q, pgl.K_ESCAPE):
                 from .menu import MenuScene
                 SceneChangeEvent.post(scene=MenuScene())
+            if ev.key == pgl.K_e:
+                from .night import NightScene
+                SceneChangeEvent.post(scene=NightScene())
         elif ev.type == pgl.MOUSEBUTTONDOWN:
             if ev.button == 1:
                 # Check tools
index 6944f5f00359fb89f764e96e667e8de68dd0924f..edaa15a6e3b2ba559565b96f6a6ee0db6c5c3194 100644 (file)
@@ -32,6 +32,9 @@ class NightScene(BaseScene):
             if ev.key in (pgl.K_q, pgl.K_ESCAPE):
                 from .menu import MenuScene
                 SceneChangeEvent.post(scene=MenuScene())
+            if ev.key == pgl.K_e:
+                from .day import DayScene
+                SceneChangeEvent.post(scene=DayScene())
         elif ev.type == pgl.MOUSEBUTTONDOWN:
             if ev.button == 1:
                 self._lights.toggle_nearest(ev.pos, surfpos=True)