mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-25 01:17:10 +01:00
13 lines
213 B
GDScript3
13 lines
213 B
GDScript3
|
tool
|
||
|
extends TextureRect
|
||
|
|
||
|
func set_texture(tex: Texture)-> void:
|
||
|
texture = tex
|
||
|
|
||
|
if tex is PackerImageResource:
|
||
|
var t : ImageTexture = ImageTexture.new()
|
||
|
|
||
|
t.create_from_image(tex.data, 0)
|
||
|
|
||
|
texture = t
|