add_slot in ResourcePropertyList.gd will now return the expected index.

This commit is contained in:
Relintai 2022-03-09 18:31:54 +01:00
parent 2923ee154a
commit 99b786e5a5

View File

@ -310,17 +310,19 @@ func add_slot(getter : String, setter : String, control : Control) -> int:
var content_node = $MainContainer/Content
content_node.add_child(control)
var slot_idx : int = content_node.get_child_count() - 1
var child_idx : int = content_node.get_child_count() - 1
var arr : Array = Array()
arr.append(slot_idx)
arr.append(child_idx)
arr.append(getter)
arr.append(setter)
arr.append(control)
properties.append(arr)
var slot_idx : int = properties.size() - 1
return slot_idx
func get_property_control(slot_idx : int) -> Node: