EditorSproutyDialogsArrayField
Inherits: VBoxContainer
Description
This component is used to create a field for an array of data. It allows the user to add, remove and modify items in the array.
Methods
| Return Type | Method |
|---|---|
| Array | get_array() |
| Array | get_items_values() |
| Array | get_items_types() |
| void | set_array(items: Array) |
| void | clear_array() |
Signals
signal modified
Emitted when the array is modified.
signal array_changed(array: Array)
Emitted when the array is changed.
signal item_changed(item: Dictionary)
Emitted when an item in the array is changed.
signal item_added(item: Dictionary)
Emitted when a new item is added to the array.
signal item_removed(item: Dictionary)
Emitted when an item is removed from the array.
Method Descriptions
func get_array() -> Array
Return the current array of items data. Each item is a dictionary with the following structure:
{
"index": int,
"type": int,
"value": Variant,
"metadata": Dictionary
}
func get_items_values() -> Array
Return the values of the array items.
func get_items_types() -> Array
Return the types of the array items.
func set_array(items: Array) -> void
Set the array component with a given array of items data.
func clear_array() -> void
Clear the array items.