summaryrefslogtreecommitdiff
path: root/src/sliceitoff/screens/settings.py
blob: 4be56a894bf9f14e0f756d2bcb2d19b33b8a9ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
""" screens.mainmenu - Screen for mainmenu"""
from random import randrange
from sliceitoff.text import TextPage
from sliceitoff.sfx import sfx

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 =  (
            f"    Settings:\n"
            f"\n\n"
            f"\xe7SFX: "
            f"{chr(active if selection == 0 else inactive)}"
            f"[{sfx_slider}]\n\n"
            f"\xe7BGM: "
            f"{chr(active if selection == 1 else inactive)}"
            f"[{bgm_slider}]\n\n"
            f"{chr(active if selection == 2 else inactive)}"
            f"Back.")
    return TextPage(
            text,
            font = '8x8',
            size = (16_000, 16_000),
            pos = (32_000, 16_000) )