extends TextureButton

@export var hover_scale: Vector2
var init_scale = Vector2.ONE

# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	set_pivot()
	init_scale = scale
	mouse_entered.connect(_on_mouse_entered)
	mouse_exited.connect(_on_mouse_exited)

func set_pivot() -> void:
	pivot_offset = size / 2

func _on_mouse_entered() -> void:
	create_tween().tween_property(self, "scale", hover_scale, 0.1)

func _on_mouse_exited() -> void:
	create_tween().tween_property(self, "scale", init_scale, 0.1)
