summaryrefslogtreecommitdiffstats
path: root/touch_screen_button.gd
diff options
context:
space:
mode:
Diffstat (limited to 'touch_screen_button.gd')
-rw-r--r--touch_screen_button.gd8
1 files changed, 5 insertions, 3 deletions
diff --git a/touch_screen_button.gd b/touch_screen_button.gd
index b607964..d45098a 100644
--- a/touch_screen_button.gd
+++ b/touch_screen_button.gd
@@ -5,11 +5,13 @@ extends TouchScreenButton
@export var active_color: Color
func _ready() -> void:
+ connect("pressed", _on_pressed)
+ connect("released", _on_released)
$TextureRect.texture = texture
- $TextureRect/CanvasModulate.color = inactive_color
+ $TextureRect.modulate = inactive_color
func _on_pressed() -> void:
- $TextureRect/CanvasModulate.color = active_color
+ $TextureRect.modulate = active_color
func _on_released() -> void:
- $TextureRect/CanvasModulate.color = inactive_color
+ $TextureRect.modulate = inactive_color