Skip to main content

SproutyDialogsBaseNode

Abstract Class

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.

info

You should inherit from this class to create your own dialog nodes.

Properties

TypeNameDefault
Colornode_color-
Texture2Dnode_iconnull
Stringstart_node_name""
SproutyDialogsBaseNodestart_nodenull
Arrayto_node[]
Stringnode_type""
intnode_index0

Methods

Return TypeMethod
Dictionaryget_data() (abstract)
voidset_data(dict: Dictionary) (abstract)
Stringget_start_id()
Arrayget_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.