speedin-santa/Scripts/UI/IconHover.gd

15 lines
289 B
GDScript3
Raw Normal View History

2024-12-18 16:35:26 -05:00
class_name IconHover extends Button
@export var iconTex: Texture
# Called when the node enters the scene tree for the first time.
func _ready():
mouse_entered.connect(onHover)
mouse_exited.connect(onLeave)
func onHover() -> void:
icon = iconTex
func onLeave() -> void:
icon = null