An asterisk is added to the tab name if there are changes

The window title also changes when switching tabs. And yes, "has_changed_changed" is a stupid method name, I'll find another one sometime later.
This commit is contained in:
OverloadedOrama 2020-06-05 20:15:40 +03:00
parent 6d87901056
commit 9ffce37c0b
5 changed files with 22 additions and 6 deletions

View file

@ -18,7 +18,7 @@ func _ready() -> void:
setup_image_menu()
setup_help_menu()
Global.window_title = "(" + tr("untitled") + ") - Pixelorama " + Global.current_version
Global.window_title = tr("untitled") + " - Pixelorama " + Global.current_version
Global.current_project.layers[0].name = tr("Layer") + " 0"
Global.layers_container.get_child(0).label.text = Global.current_project.layers[0].name
@ -225,9 +225,7 @@ func handle_loading_files(files : PoolStringArray) -> void:
if file.get_extension().to_lower() == "pxo":
_on_OpenSprite_file_selected(file)
else:
$ImportSprites.new_frame = false
$ImportSprites._on_ImportSprites_files_selected([file])
$ImportSprites.new_frame = true
func _notification(what : int) -> void: