developing settings system

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

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
{
"animation": "InOutQuart"
}
+14
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