mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Set export path when importing an image
This commit is contained in:
parent
2b5f6b47ee
commit
4f1c475c8d
|
@ -175,6 +175,7 @@ var cursor_position_label : Label
|
|||
var zoom_level_label : Label
|
||||
|
||||
var import_sprites_dialog : FileDialog
|
||||
var export_dialog : AcceptDialog
|
||||
|
||||
var left_color_picker : ColorPickerButton
|
||||
var right_color_picker : ColorPickerButton
|
||||
|
@ -309,6 +310,7 @@ func _ready() -> void:
|
|||
zoom_level_label = find_node_by_name(root, "ZoomLevel")
|
||||
|
||||
import_sprites_dialog = find_node_by_name(root, "ImportSprites")
|
||||
export_dialog = find_node_by_name(root, "ExportDialog")
|
||||
|
||||
left_tool_options_container = find_node_by_name(root, "LeftToolOptions")
|
||||
right_tool_options_container = find_node_by_name(root, "RightToolOptions")
|
||||
|
|
|
@ -469,6 +469,7 @@ func _on_ExportDialog_about_to_show() -> void:
|
|||
$VBoxContainer/Options/Resize.value = resize
|
||||
$VBoxContainer/Options/Interpolation.selected = interpolation
|
||||
$VBoxContainer/Path/PathLineEdit.text = directory_path
|
||||
$Popups/PathDialog.current_path = directory_path
|
||||
$VBoxContainer/File/FileLineEdit.text = file_name
|
||||
$VBoxContainer/File/FileFormat.selected = file_format
|
||||
show_tab()
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
[ext_resource path="res://src/UI/Dialogs/ExportDialog.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot-gifexporter/src/GifExporter.gd" type="Script" id=2]
|
||||
|
||||
|
||||
|
||||
[node name="ExportDialog" type="AcceptDialog"]
|
||||
margin_right = 532.0
|
||||
margin_bottom = 530.0
|
||||
|
@ -321,12 +319,12 @@ margin_bottom = 494.0
|
|||
rect_min_size = Vector2( 440, 300 )
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 0
|
||||
window_title = "Otwórz katalog"
|
||||
window_title = "Open a Directory"
|
||||
resizable = true
|
||||
mode = 2
|
||||
access = 2
|
||||
current_dir = "E:/Projekty/Godot/Pixelorama"
|
||||
current_path = "E:/Projekty/Godot/Pixelorama/"
|
||||
current_dir = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama"
|
||||
current_path = "C:/Users/Overloaded/Dropbox/Orama Founding Members/εταιρικα αρχεια/Godot Projects/Pixelorama/"
|
||||
|
||||
[node name="PathValidationAlert" type="AcceptDialog" parent="Popups"]
|
||||
margin_left = 8.0
|
||||
|
|
|
@ -143,4 +143,8 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void:
|
|||
Global.canvas.visible = true
|
||||
|
||||
Global.window_title = first_path.get_file() + " (" + tr("imported") + ") - Pixelorama"
|
||||
var file_name := first_path.get_basename().get_file()
|
||||
var directory_path := first_path.get_basename().replace(file_name, "")
|
||||
Global.export_dialog.directory_path = directory_path
|
||||
Global.export_dialog.file_name = file_name
|
||||
|
||||
|
|
Loading…
Reference in a new issue