diff --git a/src/Autoload/OpenSave.gd b/src/Autoload/OpenSave.gd index 5a6f4eeaa..31ef7ce15 100644 --- a/src/Autoload/OpenSave.gd +++ b/src/Autoload/OpenSave.gd @@ -19,6 +19,7 @@ func _ready() -> void: func handle_loading_files(files : PoolStringArray) -> void: for file in files: + file = file.replace("\\", "/") if file.get_extension().to_lower() == "pxo": open_pxo_file(file) else: diff --git a/src/UI/Dialogs/PreviewDialog.gd b/src/UI/Dialogs/PreviewDialog.gd index 1c92eec3f..530eddfa0 100644 --- a/src/UI/Dialogs/PreviewDialog.gd +++ b/src/UI/Dialogs/PreviewDialog.gd @@ -38,6 +38,8 @@ func _on_PreviewDialog_confirmed() -> void: OpenSave.open_image_as_new_tab(path, image) elif current_import_option == ImageImportOptions.SPRITESHEET: OpenSave.open_image_as_spritesheet(path, image, spritesheet_horizontal, spritesheet_vertical) + elif current_import_option == ImageImportOptions.PALETTE: + Global.palette_container.on_palette_import_file_selected(path) func _on_ImportOption_item_selected(id : int) -> void: diff --git a/src/UI/Dialogs/PreviewDialog.tscn b/src/UI/Dialogs/PreviewDialog.tscn index 8ebde6a1a..a3889a421 100644 --- a/src/UI/Dialogs/PreviewDialog.tscn +++ b/src/UI/Dialogs/PreviewDialog.tscn @@ -63,7 +63,7 @@ margin_right = 151.0 margin_bottom = 20.0 mouse_default_cursor_shape = 2 text = "New tab" -items = [ "New tab", null, false, 0, null, "Spritesheet (new tab)", null, false, 1, null, "New frame", null, true, 2, null, "New layer", null, true, 3, null, "New palette", null, true, 4, null ] +items = [ "New tab", null, false, 0, null, "Spritesheet (new tab)", null, false, 1, null, "New frame", null, true, 2, null, "New layer", null, true, 3, null, "New palette", null, false, 4, null ] selected = 0 [node name="SpritesheetOptions" type="HBoxContainer" parent="VBoxContainer/HBoxContainer"]