allegement de syntaxe.
This commit is contained in:
parent
e2bcb5e38d
commit
777111219f
5 changed files with 11 additions and 10 deletions
scenes/GUI
|
@ -46,7 +46,6 @@ margin_left = 4.0
|
|||
margin_top = 4.0
|
||||
margin_right = 1020.0
|
||||
margin_bottom = 596.0
|
||||
mouse_filter = 1
|
||||
theme = SubResource( 2 )
|
||||
|
||||
[node name="Home" parent="." index="1" instance=ExtResource( 4 )]
|
||||
|
|
|
@ -23,6 +23,7 @@ func _on_SaveHUD_pressed():
|
|||
if err:
|
||||
print("Error code when loading config file: ", err)
|
||||
|
||||
|
||||
for child in get_node("Windows" ).get_children():
|
||||
child.save_to_file( config_file )
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
[ext_resource path="res://scenes/GUI/HUD/trauma.gd" type="Script" id=10]
|
||||
[ext_resource path="res://scenes/GUI/HUD/douleur.gd" type="Script" id=11]
|
||||
|
||||
[node name="HUD" type="MarginContainer" index="0"]
|
||||
[node name="HUD" type="MarginContainer"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
|
@ -20,7 +20,7 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
rect_pivot_offset = Vector2( 0, 0 )
|
||||
rect_clip_content = false
|
||||
mouse_filter = 2
|
||||
mouse_filter = 1
|
||||
mouse_default_cursor_shape = 0
|
||||
size_flags_horizontal = 1
|
||||
size_flags_vertical = 1
|
||||
|
|
|
@ -25,13 +25,14 @@ func load_settings():
|
|||
# On suppose que le fichier n'existe pas encore, donc on le crée.
|
||||
config_file.set_value( "theme", "font_size", 14 )
|
||||
config_file.save( "user://settings.cfg" )
|
||||
else:
|
||||
elif not err == OK:
|
||||
print("Error code when loading config file: ", err)
|
||||
|
||||
if $Menus.get_theme() and config_file.get_value( "theme", "font_size" ):
|
||||
$Menus.get_theme().default_font.size = config_file.get_value( "theme", "font_size" )
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size_bar.value = config_file.get_value( "theme", "font_size" )
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( $Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size_bar.value )
|
||||
var font_size = config_file.get_value( "theme", "font_size" )
|
||||
if $Menus.get_theme() and font_size:
|
||||
$Menus.get_theme().default_font.size = font_size
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size_bar.value = font_size
|
||||
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( font_size )
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ use_filter = false
|
|||
font_data = ExtResource( 2 )
|
||||
_sections_unfolded = [ "Font", "Settings" ]
|
||||
|
||||
[node name="Settings" type="MarginContainer"]
|
||||
[node name="Settings" type="MarginContainer" index="0"]
|
||||
|
||||
anchor_left = 0.0
|
||||
anchor_top = 0.0
|
||||
|
|
Loading…
Reference in a new issue