Use new window_title variable to change window's title

Will be used later to get the current window title. Godot doesn't seem to have a built-in way to get the window's title.
This commit is contained in:
OverloadedOrama 2020-02-22 17:21:52 +02:00
parent 52fa460876
commit eab3669eb2
3 changed files with 9 additions and 4 deletions

View file

@ -161,7 +161,7 @@ func _ready() -> void:
else:
$ImportSprites._on_ImportSprites_files_selected([arg])
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
Global.window_title = "(" + tr("untitled") + ") - Pixelorama"
Global.canvas.layers[0][2] = tr("Layer") + " 0"
Global.canvas.generate_layer_panels()
@ -484,7 +484,7 @@ func _on_OpenSprite_file_selected(path : String) -> void:
file_menu.set_item_text(2, tr("Save") + " %s" % path.get_file())
file_menu.set_item_text(5, tr("Export") + " %s" % $ExportSprites.current_path.get_file())
OS.set_window_title(path.get_file() + " - Pixelorama")
Global.window_title = path.get_file() + " - Pixelorama"
func _on_SaveSprite_file_selected(path : String) -> void:
@ -560,7 +560,7 @@ func clear_canvases() -> void:
$ExportSprites.current_export_path = ""
file_menu.set_item_text(2, "Save")
file_menu.set_item_text(5, "Export PNG...")
OS.set_window_title("(" + tr("untitled") + ") - Pixelorama")
Global.window_title = "(" + tr("untitled") + ") - Pixelorama"
Global.undo_redo.clear_history(false)
func _on_ImportSprites_popup_hide() -> void: