12 lines
229 B
GDScript
12 lines
229 B
GDScript
extends Control
|
|
|
|
class_name Photo
|
|
|
|
@onready var texture_rect: TextureRect = $%PhotoTexture
|
|
|
|
func setup(texture: Texture) -> void:
|
|
if texture:
|
|
if !texture_rect:
|
|
texture_rect = $%PhotoTexture
|
|
texture_rect.texture = texture
|