24 lines
490 B
GDScript
24 lines
490 B
GDScript
extends BaseControl
|
|
|
|
@export var TextureNormal :Texture2D
|
|
@export var TexturePressed : Texture2D
|
|
|
|
|
|
func _ready() -> void:
|
|
super._ready()
|
|
self.button_down.connect(_on_button_down)
|
|
self.button_up.connect(_on_button_up)
|
|
$TextureRect.texture=TextureNormal
|
|
self.flat=true
|
|
|
|
pass
|
|
|
|
func _on_button_down() -> void:
|
|
$TextureRect.texture=TexturePressed
|
|
pass # Replace with function body.
|
|
|
|
|
|
func _on_button_up() -> void:
|
|
$TextureRect.texture=TextureNormal
|
|
pass # Replace with function body.
|