correction d'un erreur avec change_title lorsquele node n'existe pas encore.

This commit is contained in:
osquallo 2018-08-08 14:59:20 +02:00
parent e212bf143b
commit 2a4d823c28

View file

@ -21,12 +21,13 @@ func on_window_size_changed():
change_title() change_title()
func change_title(): func change_title():
var title_node = get_node( WINDOW_TITLE_INPUT ) if has_node( WINDOW_TITLE_INPUT ):
var title = "Khanat" var title_node = get_node( WINDOW_TITLE_INPUT )
if title_node and not title_node.text.strip_edges() == "": var title = "Khanat"
title = title_node.text.strip_edges() if title_node and not title_node.text.strip_edges() == "":
title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")" title = title_node.text.strip_edges()
OS.set_window_title( title ) title += " (" + String(OS.get_window_size().x) + "x" + String(OS.get_window_size().y) + ")"
OS.set_window_title( title )
func _on_login_scene_character_creation_finished(): func _on_login_scene_character_creation_finished():
var config_file = ConfigFile.new() var config_file = ConfigFile.new()