adding debug message
This commit is contained in:
parent
948f45bade
commit
e7ba3d0d56
5 changed files with 46 additions and 46 deletions
|
@ -177,7 +177,7 @@ func save_to_config(section, key, value):
|
||||||
var config = ConfigFile.new()
|
var config = ConfigFile.new()
|
||||||
var err = config.load( config_file )
|
var err = config.load( config_file )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[input_map_button_node:save_to_config] Error code when loading config file: ", err)
|
||||||
else:
|
else:
|
||||||
config.set_value(section, key, value)
|
config.set_value(section, key, value)
|
||||||
config.save( config_file )
|
config.save( config_file )
|
||||||
|
|
|
@ -7,7 +7,7 @@ func _ready():
|
||||||
var config_file = ConfigFile.new()
|
var config_file = ConfigFile.new()
|
||||||
var err = config_file.load( HUD_config_file )
|
var err = config_file.load( HUD_config_file )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://gui_scene/GUI/HUD/HUD.gd:_ready] Error code when loading config file: ", err)
|
||||||
else:
|
else:
|
||||||
for child in get_node("Windows" ).get_children():
|
for child in get_node("Windows" ).get_children():
|
||||||
child.load_from_file( config_file )
|
child.load_from_file( config_file )
|
||||||
|
@ -21,7 +21,7 @@ func _on_SaveHUD_pressed():
|
||||||
var config_file = ConfigFile.new()
|
var config_file = ConfigFile.new()
|
||||||
var err = config_file.load( HUD_config_file )
|
var err = config_file.load( HUD_config_file )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://gui_scene/GUI/HUD/HUD.gd:_on_SaveHUD_pressed] Error code when loading config file: ", err)
|
||||||
|
|
||||||
|
|
||||||
for child in get_node("Windows" ).get_children():
|
for child in get_node("Windows" ).get_children():
|
||||||
|
|
|
@ -28,7 +28,7 @@ func load_settings():
|
||||||
config_file.set_value( "theme", "font_size", 14 )
|
config_file.set_value( "theme", "font_size", 14 )
|
||||||
config_file.save( "user://settings.cfg" )
|
config_file.save( "user://settings.cfg" )
|
||||||
elif not err == OK:
|
elif not err == OK:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://gui_scene/GUI/Settings/Settings.gd:load_settings] Error code when loading config file: ", err)
|
||||||
|
|
||||||
global.font_size = config_file.get_value( "theme", "font_size" )
|
global.font_size = config_file.get_value( "theme", "font_size" )
|
||||||
if $Menus.get_theme():
|
if $Menus.get_theme():
|
||||||
|
@ -37,7 +37,7 @@ func load_settings():
|
||||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( global.font_size )
|
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( global.font_size )
|
||||||
|
|
||||||
#var connexion = load("res://assets/Scripts/Config/connexion.gd").new()
|
#var connexion = load("res://assets/Scripts/Config/connexion.gd").new()
|
||||||
var script_connexion = load("res://assets/Scripts/Config/connexion.gd")
|
var script_connexion = preload("res://assets/Scripts/Config/connexion.gd")
|
||||||
var connexion = script_connexion.connexion.new()
|
var connexion = script_connexion.connexion.new()
|
||||||
var language = connexion.get_language()
|
var language = connexion.get_language()
|
||||||
$Menus/TabContainer/connexion/v_box_container/h_box_container/register.text = connexion.get_url_register()
|
$Menus/TabContainer/connexion/v_box_container/h_box_container/register.text = connexion.get_url_register()
|
||||||
|
@ -56,7 +56,7 @@ func load_settings():
|
||||||
# var config_file = ConfigFile.new()
|
# var config_file = ConfigFile.new()
|
||||||
# var err = config_file.load( "user://settings.cfg" )
|
# var err = config_file.load( "user://settings.cfg" )
|
||||||
# if err:
|
# if err:
|
||||||
# print("Error code when loading config file: ", err)
|
# print("[Settings:_on_ReturnButton_pressed] Error code when loading config file: ", err)
|
||||||
# config_file.set_value("theme", "font_size", $Menus.get_theme().default_font.size)
|
# config_file.set_value("theme", "font_size", $Menus.get_theme().default_font.size)
|
||||||
# config_file.save( "user://settings.cfg" )
|
# config_file.save( "user://settings.cfg" )
|
||||||
# emit_signal( "return_pressed" )
|
# emit_signal( "return_pressed" )
|
||||||
|
@ -101,12 +101,12 @@ func _on_ApplyButton_pressed():
|
||||||
var config_file = ConfigFile.new()
|
var config_file = ConfigFile.new()
|
||||||
var err = config_file.load( "user://settings.cfg" )
|
var err = config_file.load( "user://settings.cfg" )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://gui_scene/GUI/Settings/Settings.gd:_on_ApplyButton_pressed] Error code when loading config file: ", err)
|
||||||
config_file.set_value("theme", "font_size", $Menus.get_theme().default_font.size)
|
config_file.set_value("theme", "font_size", $Menus.get_theme().default_font.size)
|
||||||
config_file.save( "user://settings.cfg" )
|
config_file.save( "user://settings.cfg" )
|
||||||
|
|
||||||
# Save Connexion
|
# Save Connexion
|
||||||
var script_connexion = load("res://assets/Scripts/Config/connexion.gd")
|
var script_connexion = preload("res://assets/Scripts/Config/connexion.gd")
|
||||||
var connexion = script_connexion.connexion.new()
|
var connexion = script_connexion.connexion.new()
|
||||||
connexion.set_url_register($Menus/TabContainer/connexion/v_box_container/h_box_container/register.text)
|
connexion.set_url_register($Menus/TabContainer/connexion/v_box_container/h_box_container/register.text)
|
||||||
connexion.set_url_login($Menus/TabContainer/connexion/v_box_container/h_box_container2/connexion.text)
|
connexion.set_url_login($Menus/TabContainer/connexion/v_box_container/h_box_container2/connexion.text)
|
||||||
|
|
|
@ -7,7 +7,7 @@ func _ready():
|
||||||
var config_file = ConfigFile.new()
|
var config_file = ConfigFile.new()
|
||||||
var err = config_file.load( HUD_config_file )
|
var err = config_file.load( HUD_config_file )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://scenes/GUI/HUD/HUD.gd:_ready] Error code when loading config file: ", err)
|
||||||
else:
|
else:
|
||||||
for child in get_node("Windows" ).get_children():
|
for child in get_node("Windows" ).get_children():
|
||||||
child.load_from_file( config_file )
|
child.load_from_file( config_file )
|
||||||
|
@ -21,7 +21,7 @@ func _on_SaveHUD_pressed():
|
||||||
var config_file = ConfigFile.new()
|
var config_file = ConfigFile.new()
|
||||||
var err = config_file.load( HUD_config_file )
|
var err = config_file.load( HUD_config_file )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://scenes/GUI/HUD/HUD.gd:_on_SaveHUD_pressed] Error code when loading config file: ", err)
|
||||||
|
|
||||||
|
|
||||||
for child in get_node("Windows" ).get_children():
|
for child in get_node("Windows" ).get_children():
|
||||||
|
|
|
@ -26,7 +26,7 @@ func load_settings():
|
||||||
config_file.set_value( "theme", "font_size", 14 )
|
config_file.set_value( "theme", "font_size", 14 )
|
||||||
config_file.save( "user://settings.cfg" )
|
config_file.save( "user://settings.cfg" )
|
||||||
elif not err == OK:
|
elif not err == OK:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://scenes/GUI/Settings/Settings.gd:load_settings] Error code when loading config file: ", err)
|
||||||
|
|
||||||
global.font_size = config_file.get_value( "theme", "font_size" )
|
global.font_size = config_file.get_value( "theme", "font_size" )
|
||||||
if $Menus.get_theme():
|
if $Menus.get_theme():
|
||||||
|
@ -41,7 +41,7 @@ func _on_ReturnButton_pressed():
|
||||||
var config_file = ConfigFile.new()
|
var config_file = ConfigFile.new()
|
||||||
var err = config_file.load( "user://settings.cfg" )
|
var err = config_file.load( "user://settings.cfg" )
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
print("[res://scenes/GUI/Settings/Settings.gd:_on_ReturnButton_pressed] Error code when loading config file: ", err)
|
||||||
|
|
||||||
config_file.set_value("theme", "font_size", $Menus.get_theme().default_font.size)
|
config_file.set_value("theme", "font_size", $Menus.get_theme().default_font.size)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue