Skip to content

Commit

Permalink
read settings major fix
Browse files Browse the repository at this point in the history
  • Loading branch information
karastoyanov committed Jul 25, 2023
1 parent eb7adff commit e78d8f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
10 changes: 7 additions & 3 deletions gui/settings.py → gui/settings_menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
9 changes: 0 additions & 9 deletions gui/test.py

This file was deleted.

0 comments on commit e78d8f7

Please sign in to comment.