19 lines
281 B
GDScript3
19 lines
281 B
GDScript3
|
extends TextureRect
|
||
|
|
||
|
signal click
|
||
|
|
||
|
var selected:bool=false:
|
||
|
set(val):
|
||
|
selected=val
|
||
|
if selected:
|
||
|
%selected.show()
|
||
|
else:
|
||
|
%selected.hide()
|
||
|
func set_text(text:String):
|
||
|
$Label.text=text
|
||
|
|
||
|
|
||
|
func _on_click_pressed() -> void:
|
||
|
click.emit()
|
||
|
pass # Replace with function body.
|