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
| Type | Name | Default |
|---|---|---|
| EditorUndoRedoManager | undo_redo | - |
Methods
| Return Type | Method |
|---|---|
| Dictionary | get_data() |
| void | set_data(data: Dictionary) |
| void | load_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 enabledfirst_var: First variable data (type, metadata, value)second_var: Second variable data (type, metadata, value)operator: The comparison operatorvisibility: 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.