projects
/
tabakrolletjie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1460205
)
Enable continue on save file existance
author
Neil
<neil@dip.sun.ac.za>
Sat, 10 Sep 2016 20:36:22 +0000
(22:36 +0200)
committer
Neil
<neil@dip.sun.ac.za>
Sat, 10 Sep 2016 20:36:33 +0000
(22:36 +0200)
tabakrolletjie/scenes/menu.py
patch
|
blob
|
history
diff --git
a/tabakrolletjie/scenes/menu.py
b/tabakrolletjie/scenes/menu.py
index 440d9948efd515f542cc488de74fbe01175d1ab8..67336112c6c3e7a65151bfb524d23117bf1c7369 100644
(file)
--- a/
tabakrolletjie/scenes/menu.py
+++ b/
tabakrolletjie/scenes/menu.py
@@
-7,6
+7,7
@@
from ..events import QuitEvent, SceneChangeEvent
from ..loader import loader
from ..constants import FONTS
from ..widgets import TextButton, SpacerButton
from ..loader import loader
from ..constants import FONTS
from ..widgets import TextButton, SpacerButton
+from ..utils import save_file_exists
class MenuScene(BaseScene):
class MenuScene(BaseScene):
@@
-19,7
+20,8
@@
class MenuScene(BaseScene):
(255, 255, 255))
self._cont_but = TextButton("Continue / Retry", (255, 255, 255),
name='continue')
(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,
self._menu = [
TextButton("New Game", (255, 255, 255), name='new game'),
self._cont_but,