From 274f1d6fb3fcb077aa89aba219b0e34c6fa71ed9 Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 8 Sep 2016 19:50:10 +0200 Subject: [PATCH] Add key to trigger day/night transitions for now --- tabakrolletjie/scenes/day.py | 3 +++ tabakrolletjie/scenes/night.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index 7702fc7..44d3529 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -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 diff --git a/tabakrolletjie/scenes/night.py b/tabakrolletjie/scenes/night.py index 6944f5f..edaa15a 100644 --- a/tabakrolletjie/scenes/night.py +++ b/tabakrolletjie/scenes/night.py @@ -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) -- 2.34.1