mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-21 21:13:14 +00:00
Change paths in the open/save dialogs when switching project
This commit is contained in:
parent
58bab65518
commit
76af8a3214
2 changed files with 12 additions and 0 deletions
|
@ -149,6 +149,8 @@ var help_menu : MenuButton
|
||||||
var cursor_position_label : Label
|
var cursor_position_label : Label
|
||||||
var zoom_level_label : Label
|
var zoom_level_label : Label
|
||||||
|
|
||||||
|
var open_sprites_dialog : FileDialog
|
||||||
|
var save_sprites_dialog : FileDialog
|
||||||
var import_sprites_dialog : FileDialog
|
var import_sprites_dialog : FileDialog
|
||||||
var export_dialog : AcceptDialog
|
var export_dialog : AcceptDialog
|
||||||
var preferences_dialog : AcceptDialog
|
var preferences_dialog : AcceptDialog
|
||||||
|
@ -266,6 +268,8 @@ func _ready() -> void:
|
||||||
cursor_position_label = find_node_by_name(root, "CursorPosition")
|
cursor_position_label = find_node_by_name(root, "CursorPosition")
|
||||||
zoom_level_label = find_node_by_name(root, "ZoomLevel")
|
zoom_level_label = find_node_by_name(root, "ZoomLevel")
|
||||||
|
|
||||||
|
open_sprites_dialog = find_node_by_name(root, "OpenSprite")
|
||||||
|
save_sprites_dialog = find_node_by_name(root, "SaveSprite")
|
||||||
import_sprites_dialog = find_node_by_name(root, "ImportSprites")
|
import_sprites_dialog = find_node_by_name(root, "ImportSprites")
|
||||||
export_dialog = find_node_by_name(root, "ExportDialog")
|
export_dialog = find_node_by_name(root, "ExportDialog")
|
||||||
preferences_dialog = find_node_by_name(root, "PreferencesDialog")
|
preferences_dialog = find_node_by_name(root, "PreferencesDialog")
|
||||||
|
|
|
@ -135,6 +135,14 @@ func change_project() -> void:
|
||||||
if has_changed:
|
if has_changed:
|
||||||
Global.window_title = Global.window_title + "(*)"
|
Global.window_title = Global.window_title + "(*)"
|
||||||
|
|
||||||
|
var save_path = OpenSave.current_save_paths[Global.current_project_index]
|
||||||
|
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())
|
||||||
|
else:
|
||||||
|
Global.control.file_menu.set_item_text(3, tr("Save"))
|
||||||
|
|
||||||
|
|
||||||
func name_changed(value : String) -> void:
|
func name_changed(value : String) -> void:
|
||||||
name = value
|
name = value
|
||||||
|
|
Loading…
Add table
Reference in a new issue