immersive-home/app/content/ui/menu/edit/entity.gd

33 lines
478 B
GDScript3
Raw Normal View History

2024-04-25 14:19:12 +03:00
@tool
extends FlexContainer3D
signal on_select()
@onready var button = $Button
@onready var label = $LabelContainer
@export var icon: String = "question_mark":
set(value):
icon = value
_update()
@export var text: String = "Button":
set(value):
text = value
_update()
func _ready():
super._ready()
button.on_button_up.connect(func():
on_select.emit()
)
func _update():
if !is_node_ready(): return
button.label = icon
label.text = text
super._update()