summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJummit <jummit@web.de>2020-07-19 19:11:02 +0200
committerJummit <jummit@web.de>2021-08-21 22:15:26 +0200
commite9ef6f9815948cb0cad9efdb399f0a4a15192284 (patch)
tree188216194cddaabc5ad4124b105d53455cdc4997 /doc
parent2cfe0e5af0a803158ae75ad28e9eb5ec9f1c2a03 (diff)
Refactor GraphEdit connections
Remove duplicate bezier code and use Curve instead. Add an overridable method for retrieving the points of a connection line, which makes it posible to create custom connections lines.
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/GraphEdit.xml16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 907cf8587d..a3759a51dd 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -10,6 +10,14 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_get_connection_line" qualifiers="virtual">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="from" type="Vector2" />
+ <argument index="1" name="to" type="Vector2" />
+ <description>
+ Virtual method which can be overridden to customize how connections are drawn.
+ </description>
+ </method>
<method name="add_valid_connection_type">
<return type="void" />
<argument index="0" name="from_type" type="int" />
@@ -64,6 +72,14 @@
Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed.
</description>
</method>
+ <method name="get_connection_line">
+ <return type="PackedVector2Array" />
+ <argument index="0" name="from" type="Vector2" />
+ <argument index="1" name="to" type="Vector2" />
+ <description>
+ Returns the points which would make up a connection between [code]from[/code] and [code]to[/code].
+ </description>
+ </method>
<method name="get_connection_list" qualifiers="const">
<return type="Array" />
<description>