developing settings system

This commit is contained in:
BarsTiger
2022-05-17 11:41:17 +03:00
parent 4868324fbd
commit 7985c7fd63
4 changed files with 21 additions and 4 deletions

View File

@@ -1,3 +0,0 @@
{
"animation": "InOutQuart"
}

View File

@@ -2,6 +2,20 @@ import json
class Settings:
@staticmethod
def get_settings():
try:
with open("data/settings.json", "r") as file:
settings = json.load(file)
except FileNotFoundError:
settings = {
"animation": "InOutQuart"
}
with open("data/settings.json", "w") as file:
json.dump(settings, file)
return settings
@staticmethod
def animation():
from PyQt5.QtCore import QEasingCurve