Skip to main content
Version: 1.3

EditorSproutyDialogsOptionContainer

Inherits: VBoxContainer

Description​

Component that display a dialog option in the options node.

Properties​

TypeNameDefault
intoption_index0
EditorUndoRedoManagerundo_redo-

Methods​

Return TypeMethod
Dictionaryget_conditions()
voidload_conditions(data: Dictionary)
Stringget_dialog_key()
Dictionaryget_dialogs_text()
voidload_dialogs(dialogs: Dictionary)
voidon_locales_changed()
voidon_translation_enabled_changed(enabled: bool)
voidupdate_option_index(index: int)

Signals​

signal modified(modified: bool)

Emitted when the text in any of the text boxes changes.


signal open_text_editor(text_box: TextEdit)

Emitted when pressing the expand button to open the text editor.


signal update_text_editor(text_box: TextEdit)

Emitted when change the focus to another text box while the text editor is open.


signal option_removed(index: int)

Triggered when the option is removed.


Property Descriptions​

var option_index : int = 0

Option position index.


var undo_redo : EditorUndoRedoManager

UndoRedo manager for tracking changes to the option.


Method Descriptions​

func get_conditions() -> Dictionary

Returns the conditions data of this option.


func load_conditions(data: Dictionary) -> void

Load the given conditions data into this option.


func get_dialog_key() -> String

Return the dialog key for this option.


func get_dialogs_text() -> Dictionary

Returns dialog text and its translations.


func load_dialogs(dialogs: Dictionary) -> void

Load dialog and translations.


func on_locales_changed() -> void

Update the locale text boxes.


func on_translation_enabled_changed(enabled: bool) -> void

Handle the translation enabled setting change.


func update_option_index(index: int) -> void

Update the option position index.