From 9f8247dc4da89219b6eede08d58d96964391a077 Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Sat, 27 Apr 2024 16:26:22 +0300 Subject: refactor menus and screen showing under menu subpkg --- src/sliceitoff/game/settings.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/sliceitoff/game/settings.py (limited to 'src/sliceitoff/game/settings.py') diff --git a/src/sliceitoff/game/settings.py b/src/sliceitoff/game/settings.py deleted file mode 100644 index 0b3bed8..0000000 --- a/src/sliceitoff/game/settings.py +++ /dev/null @@ -1,28 +0,0 @@ -""" game.settings - Settings dialog """ -from enum import IntEnum - -from sliceitoff.sfx import sfx -from sliceitoff.screens import settings_screen -from .menu import Menu - - -class SettingsItems(IntEnum): - """ Items in the menu. Should match settings_screen """ - SFX = 0 - MUSIC = 1 - BACK = 2 - -class SettingsMenu(Menu): - """ Settings menu """ - def __init__(self): - super().__init__(settings_screen, len(SettingsItems)) - - def do_selection(self): - """ Custom actions for menu entries """ - match self.selection: - case SettingsItems.BACK: - self.do_fadeout() - case SettingsItems.SFX: - sfx.sfx_up() - case SettingsItems.MUSIC: - sfx.music_up() -- cgit v1.2.3