update setting menu
This commit is contained in:
parent
f351bb3bf6
commit
4e7dc77d95
3 changed files with 160 additions and 1197 deletions
BIN
assets/GUI/images/settings-Khanat-background.png
Normal file
BIN
assets/GUI/images/settings-Khanat-background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 367 KiB |
|
@ -10,7 +10,7 @@ func _ready():
|
|||
$Menus/TabContainer/Display/ScrollContainer/VBoxContainer/CurrentScreen/SpinBox.value = OS.current_screen
|
||||
|
||||
load_settings()
|
||||
|
||||
|
||||
|
||||
func _on_font_size_bar_value_changed(value):
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( value )
|
||||
|
@ -27,17 +27,17 @@ func load_settings():
|
|||
config_file.save( "user://settings.cfg" )
|
||||
elif not err == OK:
|
||||
print("Error code when loading config file: ", err)
|
||||
|
||||
|
||||
global.font_size = config_file.get_value( "theme", "font_size" )
|
||||
if $Menus.get_theme():
|
||||
$Menus.get_theme().default_font.size = global.font_size
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size_bar.value = global.font_size
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( global.font_size )
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_ReturnButton_pressed():
|
||||
|
||||
|
||||
var config_file = ConfigFile.new()
|
||||
var err = config_file.load( "user://settings.cfg" )
|
||||
if err:
|
||||
|
@ -53,7 +53,7 @@ func _on_ReturnButton_pressed():
|
|||
func _on_Title_text_changed(new_text):
|
||||
# ----------------------------------
|
||||
# Changing windows title
|
||||
var new_title = "Khanat"
|
||||
var new_title = "Khanat"
|
||||
new_text = new_text.strip_edges()
|
||||
if not new_text == "":
|
||||
new_title = new_text
|
||||
|
@ -65,7 +65,7 @@ func _on_Fullscreen_toggled(button_pressed):
|
|||
if ProjectSettings.has_setting( "display/window/size/fullscreen" ):
|
||||
ProjectSettings.set_setting("display/window/size/fullscreen", button_pressed)
|
||||
OS.window_fullscreen = ProjectSettings.get_setting("display/window/size/fullscreen")
|
||||
|
||||
|
||||
func _on_Borderless_toggled(button_pressed):
|
||||
if ProjectSettings.has_setting( "display/window/size/borderless" ):
|
||||
ProjectSettings.set_setting("display/window/size/borderless", button_pressed)
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue