mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 22:34:43 -04:00
Loading image files is now possible in HTML5
Had to move some palette png code around in order to make it possible to use these image files as palettes. Hopefully loading .pxo files should be next. Addresses #280
This commit is contained in:
parent
637a60d9ee
commit
7e3436d3ba
7 changed files with 39 additions and 28 deletions
|
@ -52,7 +52,7 @@ func _on_PreviewDialog_confirmed() -> void:
|
|||
OpenSave.open_image_as_new_layer(image, path.get_basename().get_file(), frame_index)
|
||||
|
||||
elif current_import_option == ImageImportOptions.PALETTE:
|
||||
Global.palette_container.on_palette_import_file_selected(path)
|
||||
Global.palette_container.import_image_palette(path, image)
|
||||
|
||||
elif current_import_option == ImageImportOptions.BRUSH:
|
||||
var file_name : String = path.get_basename().get_file()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
[gd_scene format=2]
|
||||
|
||||
[node name="SaveSpriteHTML5" type="ConfirmationDialog"]
|
||||
visible = true
|
||||
margin_right = 200.0
|
||||
margin_bottom = 70.0
|
||||
|
||||
|
|
|
@ -145,9 +145,12 @@ func on_new_project_file_menu_option_pressed() -> void:
|
|||
|
||||
|
||||
func open_project_file() -> void:
|
||||
Global.open_sprites_dialog.popup_centered()
|
||||
Global.dialog_open(true)
|
||||
Global.control.opensprite_file_selected = false
|
||||
if OS.get_name() == "HTML5":
|
||||
Html5FileExchange.load_image()
|
||||
else:
|
||||
Global.open_sprites_dialog.popup_centered()
|
||||
Global.dialog_open(true)
|
||||
Global.control.opensprite_file_selected = false
|
||||
|
||||
|
||||
func on_open_last_project_file_menu_option_pressed() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue