extends RichTextLabel var tween var selected = true func _ready() -> void: scale = Vector2.ZERO tween = create_tween() tween.set_ease(Tween.EASE_OUT) tween.set_trans(Tween.TRANS_BACK) tween.tween_property(self, "scale", Vector2.ONE, 0.25) func _deselect() -> void: selected = false if tween: tween.kill() tween = create_tween() tween.set_ease(Tween.EASE_OUT) tween.set_trans(Tween.TRANS_QUAD) tween.tween_property(self, "scale", Vector2.ZERO, 0.25) tween.tween_callback(func(): queue_free() )