Skip to main content
Version: 1.1.0

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.

Properties

TypeNameDefault
boolparameters_arrayfalse
boolno_expandable_textboxfalse

Methods

Return TypeMethod
Arrayget_array()
Arrayget_items_values()
Arrayget_items_types()
voidset_array(items: Array)
voidclear_array()
voiddisable_field(disabled: bool)

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.


signal open_text_editor(text_box: TextEdit)

Emitted when press the expand button in a text box field.


signal update_text_editor(text_box: TextEdit)

Emitted when a text box field gains focus and should update the text editor.


Property Descriptions

var parameters_array : bool = false

If true, you only can edit the previously setted items.


var no_expandable_textbox : bool = false

Flag to remove the expandable text box from string fields.


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.


func disable_field(disabled: bool) -> void

Disable or enable the array field.