25 lines
488 B
GDScript3
25 lines
488 B
GDScript3
|
extends RichTextLabel
|
||
|
|
||
|
signal clicked
|
||
|
|
||
|
var color_tween
|
||
|
|
||
|
func _on_play_mouse_handler_clicked() -> void:
|
||
|
clicked.emit()
|
||
|
|
||
|
|
||
|
func _on_mouse_handler_hovered() -> void:
|
||
|
if color_tween:
|
||
|
color_tween.kill()
|
||
|
|
||
|
color_tween = create_tween()
|
||
|
color_tween.tween_property(self, "self_modulate", Color.GOLD, 0.25)
|
||
|
|
||
|
|
||
|
func _on_mouse_handler_unhovered() -> void:
|
||
|
if color_tween:
|
||
|
color_tween.kill()
|
||
|
|
||
|
color_tween = create_tween()
|
||
|
color_tween.tween_property(self, "self_modulate", Color.WHITE, 0.25)
|