diff options
Diffstat (limited to 'src/sliceitoff/game/settings.py')
-rw-r--r-- | src/sliceitoff/game/settings.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/sliceitoff/game/settings.py b/src/sliceitoff/game/settings.py index 6a709a4..53d0362 100644 --- a/src/sliceitoff/game/settings.py +++ b/src/sliceitoff/game/settings.py @@ -1,4 +1,4 @@ -""" game.mainmenu - Let's user choose """ +""" game.settings - Settings dialog """ from enum import IntEnum import pygame @@ -11,16 +11,16 @@ from .explodeout import ExplodeOutGroup MOUSE_TRESHOLD = 100 class MenuItems(IntEnum): - """ Items in the menu. Should match mainmenu_screen """ + """ Items in the menu. Should match settings_screen """ SFX = 0 MUSIC = 1 BACK = 2 -class Settings(ExplodeOutGroup): +class SettingsMenu(ExplodeOutGroup): """ sprite group with imputs to make selection """ def __init__(self): super().__init__() - self.add(settings_screen(0)) + self.add(settings_screen(0,0,0)) self.selection = 0 self.mousey = 0 @@ -29,6 +29,10 @@ class Settings(ExplodeOutGroup): match self.selection: case MenuItems.BACK: self.do_fadeout() + case MenuItems.SFX: + sfx.sfx_up() + case MenuItems.MUSIC: + sfx.music_up() def update(self, dt = 0, **kwargs): """ Does it all. Reads keyboard and updates screen """ @@ -49,7 +53,10 @@ class Settings(ExplodeOutGroup): elif event.type == pygame.MOUSEMOTION: self.process_mouse_motion() self.empty() - self.add(settings_screen(self.selection)) + self.add(settings_screen( + self.selection, + sfx.sfx_volume, + sfx.music_volume)) def process_mouse_motion(self): """ Mouse movement up or down moves menu selection """ |