Enable continue on save file existance
authorNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 20:36:22 +0000 (22:36 +0200)
committerNeil <neil@dip.sun.ac.za>
Sat, 10 Sep 2016 20:36:33 +0000 (22:36 +0200)
tabakrolletjie/scenes/menu.py

index 440d9948efd515f542cc488de74fbe01175d1ab8..67336112c6c3e7a65151bfb524d23117bf1c7369 100644 (file)
@@ -7,6 +7,7 @@ from ..events import QuitEvent, SceneChangeEvent
 from ..loader import loader
 from ..constants import FONTS
 from ..widgets import TextButton, SpacerButton
+from ..utils import save_file_exists
 
 
 class MenuScene(BaseScene):
@@ -19,7 +20,8 @@ class MenuScene(BaseScene):
                                         (255, 255, 255))
         self._cont_but = TextButton("Continue / Retry", (255, 255, 255),
                                     name='continue')
-        self._cont_but.disable()
+        if not save_file_exists():
+            self._cont_but.disable()
         self._menu = [
             TextButton("New Game", (255, 255, 255), name='new game'),
             self._cont_but,