18 lines
455 B
GDScript
18 lines
455 B
GDScript
extends TextureButton
|
|
|
|
func _ready():
|
|
pressed.connect(self._button_pressed)
|
|
|
|
var was_hovered = false
|
|
func _process(delta):
|
|
|
|
if is_hovered() && !was_hovered:
|
|
Sounds.get_node("hover").play()
|
|
was_hovered = is_hovered()
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
func _button_pressed():
|
|
if (Input.mouse_mode != Input.MOUSE_MODE_CAPTURED):
|
|
Sounds.get_node("click").play()
|
|
OS.shell_open("https://cawez.ca/hiraeth")
|