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:
parent
c6a056bba6
commit
65051f0910
|
@ -4,7 +4,7 @@ class_name Cel extends Reference
|
||||||
# The "image" variable is where the image data of each cel are.
|
# 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 image_texture : ImageTexture
|
||||||
var opacity : float
|
var opacity : float
|
||||||
|
|
||||||
|
@ -16,3 +16,9 @@ func _init(_image := Image.new(), _opacity := 1.0, _image_texture : ImageTexture
|
||||||
image_texture = ImageTexture.new()
|
image_texture = ImageTexture.new()
|
||||||
image = _image
|
image = _image
|
||||||
opacity = _opacity
|
opacity = _opacity
|
||||||
|
|
||||||
|
|
||||||
|
func image_changed(value : Image) -> void:
|
||||||
|
image = value
|
||||||
|
if !image.is_empty():
|
||||||
|
image_texture.create_from_image(image, 0)
|
||||||
|
|
Loading…
Reference in a new issue