Skip to main content

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 TypeMethod
Dictionaryget_item_data()
Variantget_value()
intget_type()
Dictionaryget_metadata()
intget_item_index()
voidset_item_index(index: int)
voidset_value(value: Variant, type: int, metadata: Dictionary)
voidset_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.