Made TopMenuContainer.gd and moved all the menu code there from Main.gd

Main.gd is now easier to read
This commit is contained in:
OverloadedOrama 2020-06-13 17:59:57 +03:00
parent af078d590d
commit 2e587e3634
6 changed files with 431 additions and 419 deletions

View file

@ -139,9 +139,9 @@ func change_project() -> void:
if save_path != "":
Global.open_sprites_dialog.current_path = save_path
Global.save_sprites_dialog.current_path = save_path
Global.control.file_menu.set_item_text(3, tr("Save") + " %s" % save_path.get_file())
Global.file_menu.get_popup().set_item_text(3, tr("Save") + " %s" % save_path.get_file())
else:
Global.control.file_menu.set_item_text(3, tr("Save"))
Global.file_menu.get_popup().set_item_text(3, tr("Save"))
func serialize() -> Dictionary: