Fixed error when double clicking an item in the DemoPicker

This commit is contained in:
Nathan Lovato 2020-02-13 12:01:48 -06:00
parent ca1839c633
commit 6edec919e8
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@ This document lists new features, improvements, changes, and bug fixes in every
- Fixed `GSAIKinematicBody3DAgent` and `GSAIRigidBody3DAgent` trying to use `global_position` instead of `transform.origin`.
- The `SeekFleeDemo`'s boundaries will now match the size of the screen.
- Fixed error when double clicking an item in the DemoPicker.
## Godot Steering AI Framework 2.0.0 ##

View File

@ -15,7 +15,7 @@ func _ready() -> void:
# warning-ignore:return_value_discarded
list.connect("demo_selected", self, "set_demo_path")
# warning-ignore:return_value_discarded
list.connect("item_activated", self, "emit_signal", ["demo_requested"])
list.connect("item_activated", self, "_on_ItemList_item_activated")
# warning-ignore:return_value_discarded
button.connect("pressed", self, "emit_signal", ["demo_requested"])
demo_path = list.file_paths[0]
@ -23,3 +23,7 @@ func _ready() -> void:
func set_demo_path(value: String) -> void:
demo_path = value
func _on_ItemList_item_activated(_index: int) -> void:
emit_signal("demo_requested")