mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-12-28 09:47:16 +01:00
77f90b0c74
Also turned off the setting for discarded return value warnings as it triggers for many calls, including to built-in functions.
23 lines
558 B
GDScript
23 lines
558 B
GDScript
class_name DemoPickerUI
|
|
extends Control
|
|
|
|
|
|
# warning-ignore:unused_signal
|
|
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
|