22 lines
337 B
GDScript3
22 lines
337 B
GDScript3
|
extends TextureButton
|
||
|
|
||
|
|
||
|
@export var TextureNormal:Texture2D
|
||
|
|
||
|
@export var TextureDown:Texture2D
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
func _ready() -> void:
|
||
|
self.focus_mode=Control.FOCUS_NONE
|
||
|
button_down.connect(_button_down)
|
||
|
button_up.connect(_button_up)
|
||
|
|
||
|
|
||
|
func _button_down():
|
||
|
$TextureRect.texture=TextureDown
|
||
|
|
||
|
func _button_up():
|
||
|
$TextureRect.texture=TextureNormal
|