1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-31 07:29:49 +00:00

Added ability to import images as palettes

This commit is contained in:
OverloadedOrama 2020-06-17 03:56:46 +03:00
parent 063ea04b4c
commit f7cc9a8104
3 changed files with 4 additions and 1 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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"]