From 5997f13f5e3ba4ebb6035c53dbb7ca6e5e921869 Mon Sep 17 00:00:00 2001 From: adrianna Date: Sat, 10 Sep 2016 15:37:10 +0200 Subject: [PATCH] hooked up night button and moved cursor reset next to other tools --- tabakrolletjie/scenes/day.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tabakrolletjie/scenes/day.py b/tabakrolletjie/scenes/day.py index cb65569..57eeedb 100644 --- a/tabakrolletjie/scenes/day.py +++ b/tabakrolletjie/scenes/day.py @@ -60,7 +60,11 @@ class DayScene(BaseScene): def create_tools(self, gamestate): tools = [] - x, y, step = 50, SCREEN_SIZE[1] - 40, 50 + x, y, step = 0, SCREEN_SIZE[1] - 40, 50 + + tools.append(ImageButton( + '32', 'default_cursor.png', name='reset tool', pos=(x, y))) + x += step tools.append(ImageButton('32', 'seed.png', name='seed', pos=(x, y))) x += step @@ -72,8 +76,9 @@ class DayScene(BaseScene): tools.append(tool) x += step + # TODO: will also add back to menu button tools.append(ImageButton( - '32', 'default_cursor.png', name='reset tool', pos=(x, y))) + '32', 'night.png', name='start night', pos=(SCREEN_SIZE[0] - 50, y))) return tools def exit(self, gamestate): @@ -179,6 +184,9 @@ class DayScene(BaseScene): self._unset_cursor() self._tool = None self._clear_light_toolbar() + elif tool.name == 'start night': + from .night import NightScene + SceneChangeEvent.post(scene=NightScene()) else: self._tool = tool if self._tool.name == 'seed': -- 2.34.1