mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-12-24 05:37:15 +01:00
5627a5636a
It did not have a file path by default, but had an index. Also, the camera on Seek/Flee caused the Go Back button not to show. The scene's been amended and the camera removed, since it wasn't actually useful.
22 lines
535 B
GDScript
22 lines
535 B
GDScript
class_name DemoPickerUI
|
|
extends CenterContainer
|
|
|
|
|
|
signal demo_requested
|
|
|
|
var demo_path := "" setget set_demo_path
|
|
|
|
onready var list: ItemList = $VBoxContainer/ItemList
|
|
onready var button: Button = $VBoxContainer/Button
|
|
|
|
|
|
func _ready() -> void:
|
|
list.connect("demo_selected", self, "set_demo_path")
|
|
list.connect("item_activated", self, "emit_signal", ["demo_requested"])
|
|
button.connect("pressed", self, "emit_signal", ["demo_requested"])
|
|
demo_path = list.file_paths[0]
|
|
|
|
|
|
func set_demo_path(value: String) -> void:
|
|
demo_path = value
|