This commit is contained in:
Auric Vente
2024-07-20 04:48:04 -06:00
parent 6450af91be
commit 896b39eb4a
5 changed files with 59 additions and 5 deletions

26
cromulant/settings.py Normal file
View File

@@ -0,0 +1,26 @@
from .window import Window
from .storage import Storage
class Settings:
speed: str
@staticmethod
def prepare() -> None:
settings = Storage.get_settings()
Settings.speed = settings.get("speed", "normal")
speed = Settings.speed.capitalize()
Window.speed.setCurrentText(speed)
@staticmethod
def save() -> None:
settings = {
"speed": Settings.speed,
}
Storage.save_settings(settings)
@staticmethod
def set_speed(speed: str) -> None:
Settings.speed = speed
Settings.save()