petit fix en cas d'abscence de la taille de police dans le fichier conf.
This commit is contained in:
parent
2c6b10dd0a
commit
869e7b4ad4
3 changed files with 8 additions and 7 deletions
|
@ -41,11 +41,11 @@ func _input(event):
|
||||||
play()
|
play()
|
||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
# Capturing/Freeing the cursor
|
# Capturing/Freeing the cursor
|
||||||
# if Input.is_action_just_pressed("ui_free_cursor"):
|
if Input.is_action_just_pressed("ui_free_cursor") and event is InputEventKey:
|
||||||
# if Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE:
|
if Input.get_mouse_mode() == Input.MOUSE_MODE_VISIBLE:
|
||||||
# Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
|
||||||
# else:
|
else:
|
||||||
# Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||||
# ----------------------------------
|
# ----------------------------------
|
||||||
|
|
||||||
# Si on est en mode "deplacement", on desative le focus sur l'interface
|
# Si on est en mode "deplacement", on desative le focus sur l'interface
|
||||||
|
|
|
@ -19,7 +19,7 @@ _sections_unfolded = [ "Font", "Settings" ]
|
||||||
|
|
||||||
default_font = SubResource( 1 )
|
default_font = SubResource( 1 )
|
||||||
|
|
||||||
[node name="GUI" type="MarginContainer"]
|
[node name="GUI" type="MarginContainer" index="0"]
|
||||||
|
|
||||||
anchor_left = 0.0
|
anchor_left = 0.0
|
||||||
anchor_top = 0.0
|
anchor_top = 0.0
|
||||||
|
|
|
@ -23,6 +23,7 @@ func load_settings():
|
||||||
if err:
|
if err:
|
||||||
print("Error code when loading config file: ", err)
|
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.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_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 )
|
$Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size/font_size_value.text = str( $Menus/TabContainer/Test/ScrollContainer/VBoxContainer/font_size_bar.value )
|
||||||
|
|
Loading…
Reference in a new issue