add animations and train selector logic

This commit is contained in:
2026-05-15 22:31:57 +02:00
parent 483947312d
commit 96d58866eb
8 changed files with 113 additions and 12 deletions

View File

@@ -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()