blob: b6079649dce75b668702e566117f9593ad3cdb26 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
extends TouchScreenButton
@export var texture: Texture2D
@export var inactive_color: Color
@export var active_color: Color
func _ready() -> void:
$TextureRect.texture = texture
$TextureRect/CanvasModulate.color = inactive_color
func _on_pressed() -> void:
$TextureRect/CanvasModulate.color = active_color
func _on_released() -> void:
$TextureRect/CanvasModulate.color = inactive_color
|