From: adrianna Date: Sat, 10 Sep 2016 13:37:10 +0000 (+0200) Subject: hooked up night button and moved cursor reset next to other tools X-Git-Tag: tabakrolletjie-v1.0.0~97^2~6 X-Git-Url: https://git.ctpug.org.za/?a=commitdiff_plain;h=5997f13f5e3ba4ebb6035c53dbb7ca6e5e921869;p=tabakrolletjie.git hooked up night button and moved cursor reset next to other tools --- 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':