hooked up night button and moved cursor reset next to other tools
authoradrianna <adrianna.pinska@gmail.com>
Sat, 10 Sep 2016 13:37:10 +0000 (15:37 +0200)
committeradrianna <adrianna.pinska@gmail.com>
Sat, 10 Sep 2016 13:42:22 +0000 (15:42 +0200)
tabakrolletjie/scenes/day.py

index cb65569e3da70207fbeb33794e87c75a2a33d77a..57eeedb51f3d440e0af7a40da7841a3c590d205b 100644 (file)
@@ -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':