mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Import multiple images at once from File > Open
This commit is contained in:
parent
31b56500c2
commit
30f9a3875d
12
src/Main.gd
12
src/Main.gd
|
@ -204,8 +204,8 @@ func _notification(what: int) -> void:
|
|||
Global.has_focus = true
|
||||
|
||||
|
||||
func _on_files_dropped(_files: PoolStringArray, _screen: int) -> void:
|
||||
OpenSave.handle_loading_files(_files)
|
||||
func _on_files_dropped(files: PoolStringArray, _screen: int) -> void:
|
||||
OpenSave.handle_loading_files(files)
|
||||
var splash_dialog = Global.control.get_node("Dialogs/SplashDialog")
|
||||
if splash_dialog.visible:
|
||||
splash_dialog.hide()
|
||||
|
@ -251,10 +251,10 @@ func load_recent_project_file(path: String) -> void:
|
|||
Global.dialog_open(true)
|
||||
|
||||
|
||||
func _on_OpenSprite_file_selected(path: String) -> void:
|
||||
OpenSave.handle_loading_files([path])
|
||||
Global.save_sprites_dialog.current_dir = path.get_base_dir()
|
||||
Global.config_cache.set_value("data", "current_dir", path.get_base_dir())
|
||||
func _on_OpenSprite_files_selected(paths: PoolStringArray) -> void:
|
||||
OpenSave.handle_loading_files(paths)
|
||||
Global.save_sprites_dialog.current_dir = paths[0].get_base_dir()
|
||||
Global.config_cache.set_value("data", "current_dir", paths[0].get_base_dir())
|
||||
|
||||
|
||||
func _on_SaveSprite_file_selected(path: String) -> void:
|
||||
|
|
|
@ -64,6 +64,8 @@ __meta__ = {
|
|||
[node name="CreateNewImage" parent="Dialogs" instance=ExtResource( 28 )]
|
||||
|
||||
[node name="OpenSprite" parent="Dialogs" instance=ExtResource( 12 )]
|
||||
window_title = "Open File(s)"
|
||||
mode = 1
|
||||
|
||||
[node name="SaveSprite" parent="Dialogs" instance=ExtResource( 11 )]
|
||||
margin_left = 108.0
|
||||
|
@ -139,7 +141,7 @@ visible = false
|
|||
|
||||
[connection signal="popup_hide" from="Dialogs/SplashDialog" to="." method="_can_draw_true"]
|
||||
[connection signal="popup_hide" from="Dialogs/CreateNewImage" to="." method="_can_draw_true"]
|
||||
[connection signal="file_selected" from="Dialogs/OpenSprite" to="." method="_on_OpenSprite_file_selected"]
|
||||
[connection signal="files_selected" from="Dialogs/OpenSprite" to="." method="_on_OpenSprite_files_selected"]
|
||||
[connection signal="popup_hide" from="Dialogs/OpenSprite" to="." method="_on_OpenSprite_popup_hide"]
|
||||
[connection signal="file_selected" from="Dialogs/SaveSprite" to="." method="_on_SaveSprite_file_selected"]
|
||||
[connection signal="popup_hide" from="Dialogs/SaveSprite" to="." method="_can_draw_true"]
|
||||
|
|
Loading…
Reference in a new issue