summaryrefslogtreecommitdiff
path: root/src/sliceitoff/game/game.py
diff options
context:
space:
mode:
authorViljami Ilola <+@hix.fi>2024-04-26 23:21:22 +0300
committerViljami Ilola <+@hix.fi>2024-04-26 23:21:22 +0300
commit54cf5ab6dde77dff1afe177b33a054925569a0cf (patch)
tree4d37391b38104546ef2321ecb6d48ad2b6624cb2 /src/sliceitoff/game/game.py
parent220211bf89e5c873c2ee694b14ab70578188a36c (diff)
settings submenu
Diffstat (limited to 'src/sliceitoff/game/game.py')
-rw-r--r--src/sliceitoff/game/game.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sliceitoff/game/game.py b/src/sliceitoff/game/game.py
index c6a5fe0..2ef377f 100644
--- a/src/sliceitoff/game/game.py
+++ b/src/sliceitoff/game/game.py
@@ -20,6 +20,7 @@ from .mainmenu import Mainmenu, MenuItems
from .level import Level
from .show import Show
from .initials import Initials
+from .settings import Settings
class Game:
""" This is the whole game. """
@@ -81,6 +82,13 @@ class Game:
self.display.update([menu])
return menu.selection
+ def settings(self):
+ """ settings menu where one can adjust volume for example """
+ menu = Settings()
+ while menu.active:
+ menu.update(dt = self.clock.tick())
+ self.display.update([menu])
+
def run(self):
""" This is the main loop of the game """
while True:
@@ -91,6 +99,8 @@ class Game:
self.show_highscores()
case MenuItems.INSTRUCT:
self.instructions()
+ case MenuItems.SETTINGS:
+ self.settings()
case MenuItems.NEWGAME:
self.newgame()
if self.hiscores.high_enough(self.stats.score):