ld-56/components/Menu/menu_button.gd

25 lines
488 B
GDScript3
Raw Normal View History

2024-10-06 08:22:46 +00:00
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)