diff options
author | Viljami Ilola <+@hix.fi> | 2024-04-27 16:03:08 +0300 |
---|---|---|
committer | Viljami Ilola <+@hix.fi> | 2024-04-27 16:03:08 +0300 |
commit | d64c6b122eacd7b33bbda3a62093b492c786b1f9 (patch) | |
tree | 8145f0baae4fa822281ea8f8c05381abc747fee8 /src/sliceitoff/screens | |
parent | d73fe4bb20e544443476ebb4c9fc593fa0a8ad4a (diff) |
refactor menus
Diffstat (limited to 'src/sliceitoff/screens')
-rw-r--r-- | src/sliceitoff/screens/settings.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sliceitoff/screens/settings.py b/src/sliceitoff/screens/settings.py index c987126..4be56a8 100644 --- a/src/sliceitoff/screens/settings.py +++ b/src/sliceitoff/screens/settings.py @@ -1,9 +1,12 @@ """ screens.mainmenu - Screen for mainmenu""" from random import randrange from sliceitoff.text import TextPage +from sliceitoff.sfx import sfx -def settings_screen(selection, sfx_vol, music_vol): +def settings_screen(selection): """ Screen where current selection is flashing """ + sfx_slider = '#' * sfx.sfx_volume + ' ' * (10 - sfx.sfx_volume) + bgm_slider = '#' * sfx.music_volume + ' ' * (10 - sfx.music_volume) active = randrange(0xe9,0xf0) inactive = 0xe7 text = ( @@ -11,10 +14,10 @@ def settings_screen(selection, sfx_vol, music_vol): f"\n\n" f"\xe7SFX: " f"{chr(active if selection == 0 else inactive)}" - f"[{'#' * sfx_vol}{' ' * (10 - sfx_vol)}]\n\n" + f"[{sfx_slider}]\n\n" f"\xe7BGM: " f"{chr(active if selection == 1 else inactive)}" - f"[{'#' * music_vol}{' ' * (10 - music_vol)}]\n\n" + f"[{bgm_slider}]\n\n" f"{chr(active if selection == 2 else inactive)}" f"Back.") return TextPage( |