Add hover interaction to pause button
This commit is contained in:
parent
b636c39334
commit
e811a33464
2 changed files with 9 additions and 1 deletions
|
@ -104,4 +104,6 @@ texture = ExtResource("3_r1i66")
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
texture = ExtResource("3_r1i66")
|
texture = ExtResource("3_r1i66")
|
||||||
|
|
||||||
|
[connection signal="mouse_entered" from="Pause/PauseButton" to="." method="_on_pause_button_hold"]
|
||||||
|
[connection signal="mouse_exited" from="Pause/PauseButton" to="." method="_on_pause_button_release"]
|
||||||
[connection signal="pressed" from="Pause/PauseButton" to="." method="_on_pause_button_pressed"]
|
[connection signal="pressed" from="Pause/PauseButton" to="." method="_on_pause_button_pressed"]
|
||||||
|
|
|
@ -14,4 +14,10 @@ func set_damage(value):
|
||||||
health.pop_back()
|
health.pop_back()
|
||||||
|
|
||||||
func _on_pause_button_pressed():
|
func _on_pause_button_pressed():
|
||||||
on_paused.emit()
|
on_paused.emit()
|
||||||
|
|
||||||
|
func _on_pause_button_hold():
|
||||||
|
$Pause/PauseButton.modulate = Color(0.615686, 0.615686, 0.615686, 1)
|
||||||
|
|
||||||
|
func _on_pause_button_release():
|
||||||
|
$Pause/PauseButton.modulate = Color(1, 1, 1, 1)
|
Loading…
Reference in a new issue