add animations and train selector logic
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
@tool
|
||||
extends Control
|
||||
|
||||
class_name ArrowButton
|
||||
|
||||
signal on_pressed
|
||||
|
||||
@export var image: Texture:
|
||||
set(value):
|
||||
image = value
|
||||
@@ -19,3 +23,7 @@ func _ready():
|
||||
$%Texture.texture = image
|
||||
$%Texture.flip_h = flip_h
|
||||
|
||||
|
||||
func _on_gui_input(event: InputEvent) -> void:
|
||||
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
|
||||
on_pressed.emit()
|
||||
|
||||
Reference in New Issue
Block a user