EditorSproutyDialogsArrayFieldItem
Inherits: HBoxContainer
Description
This component is an item field from the array field. It allows the user to modify the item value and type.
Methods
| Return Type | Method |
|---|---|
| Dictionary | get_item_data() |
| Variant | get_value() |
| int | get_type() |
| Dictionary | get_metadata() |
| int | get_item_index() |
| void | set_item_index(index: int) |
| void | set_value(value: Variant, type: int, metadata: Dictionary) |
| void | set_type(type: int, metadata: Dictionary) |
Signals
signal modified
Emitted when the item is modified.
signal item_changed(item: Dictionary)
Emitted when the item is changed.
signal item_removed(index: int)
Emitted when the remove button is pressed.
Method Descriptions
func get_item_data() -> Dictionary
Returns the item data as a dictionary with the following structure:
{
"index": int,
"type": int,
"value": Variant,
"metadata": Dictionary
}
func get_value() -> Variant
Returns the current value of the item.
func get_type() -> int
Returns the current type of the item.
func get_metadata() -> Dictionary
Returns the current metadata of the item type.
func get_item_index() -> int
Returns the current index of the item in the array.
func set_item_index(index: int) -> void
Set the current index of the item.
func set_value(value: Variant, type: int, metadata: Dictionary) -> void
Set the current value of the item along with its type and metadata.
func set_type(type: int, metadata: Dictionary) -> void
Set the variable type and metadata for the item.