diff --git a/gui/settings.py b/gui/settings_menu.py similarity index 95% rename from gui/settings.py rename to gui/settings_menu.py index ed867da..7e85f4c 100755 --- a/gui/settings.py +++ b/gui/settings_menu.py @@ -23,7 +23,9 @@ import sys, os, json from pathlib import Path -sys.path.append(r'..') +sys.path.append('..') +from settings import settings_handler +gs = settings_handler.get_game_settings('../settings/game_settings.json') class SettingsMenu(QWidget): @@ -84,9 +86,11 @@ def __init__(self): fps_menu.addItems(["45", "60", "75"]) fps_menu.setFont(QFont(fonts[0], 18)) fps_menu.setFixedSize(70, 30) + fps_menu.setCurrentText(gs.get('fps')) + music_vol_slider = QSlider(Qt.Horizontal) - music_vol_slider.setValue() + # music_vol_slider.setValue() music_vol_slider.setTickInterval(20) music_vol_slider.setFocusPolicy(Qt.StrongFocus) music_vol_slider.setTickPosition(QSlider.TicksBothSides) @@ -102,7 +106,7 @@ def __init__(self): effects_vol_slider.setFixedWidth(200) user_name_textbox = QLineEdit() - user_name_textbox.setText(read_username()) + # user_name_textbox.setText() user_name_textbox.setFont(QFont(fonts[0], 18)) user_name_textbox.setFixedSize(200, 30) user_name_textbox.setAlignment(Qt.AlignCenter) diff --git a/gui/test.py b/gui/test.py deleted file mode 100644 index 5b243a5..0000000 --- a/gui/test.py +++ /dev/null @@ -1,9 +0,0 @@ -import json - -def read_username(): - user_settings_file = open(r'settings/user_settings.json') - user_data = json.load(user_settings_file) - print(user_data['username']) - - -read_username() \ No newline at end of file