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

Bring back the image_changed setter of the Cel class

Caused issues when importing files
This commit is contained in:
Manolis Papadeas 2021-07-22 16:33:20 +03:00
parent c6a056bba6
commit 65051f0910

View file

@ -4,7 +4,7 @@ class_name Cel extends Reference
# The "image" variable is where the image data of each cel are.
var image : Image
var image : Image setget image_changed
var image_texture : ImageTexture
var opacity : float
@ -16,3 +16,9 @@ func _init(_image := Image.new(), _opacity := 1.0, _image_texture : ImageTexture
image_texture = ImageTexture.new()
image = _image
opacity = _opacity
func image_changed(value : Image) -> void:
image = value
if !image.is_empty():
image_texture.create_from_image(image, 0)