Skip to main content
Version: 1.2.0

EditorSproutyDialogsConditionsContainer

Inherits: VBoxContainer

Description

Component that allows to set a condition to change the visibility of a dialog option in the options node.

If the condition is not met, you can set the option as "hidden" or "disabled".

Signals

signal open_text_editor(text_box: TextEdit)

Emitted when the expand button in a text box field is pressed.


signal update_text_editor(text_box: TextEdit)

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


signal modified(modified: bool)

Emitted when the condition is modified.


Properties

TypeNameDefault
EditorUndoRedoManagerundo_redo-

Methods

Return TypeMethod
Dictionaryget_data()
voidset_data(data: Dictionary)
voidload_type_data(data: Dictionary, field_index: int)

Property Descriptions

var undo_redo : EditorUndoRedoManager

UndoRedo manager for tracking changes to the condition.


Method Descriptions

func get_data() -> Dictionary

Returns the condition data as a dictionary containing:

  • enabled: Whether the condition is enabled
  • first_var: First variable data (type, metadata, value)
  • second_var: Second variable data (type, metadata, value)
  • operator: The comparison operator
  • visibility: The visibility setting (hidden or disabled)

func set_data(data: Dictionary) -> void

Sets the condition data from a dictionary. Loads all condition settings including enabled state, variable types, values, operator, and visibility options.


func load_type_data(data: Dictionary, field_index: int) -> void

Loads the variable type data for the specified field index. Handles special metadata hints like expressions, file paths, and directories.