1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

For PixelCel's set_content not working when passing an Image instead of ImageExtended

This commit is contained in:
Emmanouil Papadeas 2024-12-15 21:05:10 +02:00
parent 1d9b9fda1e
commit 93eab6929b

View file

@ -25,7 +25,13 @@ func get_content() -> ImageExtended:
func set_content(content, texture: ImageTexture = null) -> void:
image = content
var proper_content: ImageExtended
if content is not ImageExtended:
proper_content = ImageExtended.new()
proper_content.copy_from_custom(content, image.is_indexed)
else:
proper_content = content
image = proper_content
if is_instance_valid(texture) and is_instance_valid(texture.get_image()):
image_texture = texture
if image_texture.get_image().get_size() != image.get_size():