SproutyDialogsBaseNode
Inherits: GraphNode
Description
Abstract class for graph nodes from Sprouty Dialogs plugin.
It handles the node color and icon for the titlebar. It also provides methods to get and set the node data that should be overridden in each child node class.
You should inherit from this class to create your own dialog nodes.
Properties
| Type | Name | Default |
|---|---|---|
| Color | node_color | - |
| Texture2D | node_icon | null |
| String | start_node_name | "" |
| SproutyDialogsBaseNode | start_node | null |
| Array | to_node | [] |
| String | node_type | "" |
| int | node_index | 0 |
Methods
| Return Type | Method |
|---|---|
| Dictionary | get_data() (abstract) |
| void | set_data(dict: Dictionary) (abstract) |
| String | get_start_id() |
| Array | get_output_connections() |
Signals
signal modified(modified: bool)
Emitted when the node is modified.
Property Descriptions
var node_color : Color
Node color to display on the node titlebar.
var node_icon : Texture2D
Icon to display on the node titlebar.
var start_node_name : String = ""
Name of the start node in the dialog tree where the node belongs. Used to find the start node in the graph editor on load.
var start_node : SproutyDialogsBaseNode = null
Start node of the dialog tree where the node belongs.
var to_node : Array = []
Array to store the output nodes connections.
var node_type : String = ""
Node type name.
var node_index : int = 0
Index of the node in the graph editor.
Method Descriptions
func get_data() -> Dictionary (abstract)
Returns the node data as a dictionary. This method must be overridden in each node.
func set_data(dict: Dictionary) -> void (abstract)
Set the node data from a dictionary. This method must be overridden in each node.
func get_start_id() -> String
Returns the start node id of the dialog tree.
func get_output_connections() -> Array
Returns an array with the node's output connections.