mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-12-18 13:04:42 -05:00
Added import image as a new frame of the current project
Will also add a way to let the user choose which layer the new cel of the imported image will be.
This commit is contained in:
parent
597fdbc0c0
commit
f260971056
3 changed files with 25 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
|||
extends ConfirmationDialog
|
||||
|
||||
|
||||
enum ImageImportOptions {NEW_TAB, SPRITESHEET, NEW_FRAME, NEW_LAYER, PALETTE}
|
||||
enum ImageImportOptions {NEW_TAB, SPRITESHEET, NEW_FRAME, NEW_LAYER, PALETTE, BRUSH, PATTERN}
|
||||
|
||||
var path : String
|
||||
var image : Image
|
||||
|
|
@ -35,6 +35,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.NEW_FRAME:
|
||||
OpenSave.open_image_as_new_frame(image)
|
||||
elif current_import_option == ImageImportOptions.PALETTE:
|
||||
Global.palette_container.on_palette_import_file_selected(path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue