added exit button
[tabakrolletjie.git] / tabakrolletjie / scenes / day.py
index 57eeedb51f3d440e0af7a40da7841a3c590d205b..4c81130c9e7e77104ad24ce84a92dc35547dfb0e 100644 (file)
@@ -76,9 +76,10 @@ class DayScene(BaseScene):
             tools.append(tool)
             x += step
 
-        # TODO: will also add back to menu button
         tools.append(ImageButton(
-            '32', 'night.png', name='start night', pos=(SCREEN_SIZE[0] - 50, y)))
+            '32', 'night.png', name='start night', pos=(SCREEN_SIZE[0] - 100, y)))
+        tools.append(ImageButton(
+            '32', 'exit.png', name='exit', pos=(SCREEN_SIZE[0] - 50, y)))
         return tools
 
     def exit(self, gamestate):
@@ -187,6 +188,9 @@ class DayScene(BaseScene):
                         elif tool.name == 'start night':
                             from .night import NightScene
                             SceneChangeEvent.post(scene=NightScene())
+                        elif tool.name == 'exit':
+                            from .menu import MenuScene
+                            SceneChangeEvent.post(scene=MenuScene())
                         else:
                             self._tool = tool
                             if self._tool.name == 'seed':