From 6edec919e8071560733c3b169136d15a8b98b525 Mon Sep 17 00:00:00 2001 From: Nathan Lovato Date: Thu, 13 Feb 2020 12:01:48 -0600 Subject: [PATCH] Fixed error when double clicking an item in the DemoPicker --- CHANGELOG.md | 1 + project/demos/DemoPickerUI.gd | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 137a3bc..f9c3a71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 ## diff --git a/project/demos/DemoPickerUI.gd b/project/demos/DemoPickerUI.gd index ec98ec4..5417e1b 100644 --- a/project/demos/DemoPickerUI.gd +++ b/project/demos/DemoPickerUI.gd @@ -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")