- _connectionsLayerDraw
void _connectionsLayerDraw()
- _graphNodeMoved
void _graphNodeMoved(Node arg0)
- _graphNodeRaised
void _graphNodeRaised(Node arg0)
- _graphNodeSlotUpdated
void _graphNodeSlotUpdated(long arg0, Node arg1)
- _guiInput
void _guiInput(InputEvent arg0)
- _minimapDraw
void _minimapDraw()
- _minimapToggled
void _minimapToggled()
- _scrollMoved
void _scrollMoved(double arg0)
- _snapToggled
void _snapToggled()
- _snapValueChanged
void _snapValueChanged(double arg0)
- _topLayerDraw
void _topLayerDraw()
- _topLayerInput
void _topLayerInput(InputEvent arg0)
- _updateScrollOffset
void _updateScrollOffset()
- _zoomMinus
void _zoomMinus()
- _zoomPlus
void _zoomPlus()
- _zoomReset
void _zoomReset()
- addValidConnectionType
void addValidConnectionType(long from_type, long to_type)
Makes possible the connection between two different slot types. The type is defined with the GraphNode.setSlot method.
- addValidLeftDisconnectType
void addValidLeftDisconnectType(long type)
Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type.
- addValidRightDisconnectType
void addValidRightDisconnectType(long type)
Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type.
- clearConnections
void clearConnections()
Removes all connections between nodes.
- connectNode
GodotError connectNode(String from, long from_port, String to, long to_port)
Create a connection between the from_port slot of the from GraphNode and the to_port slot of the to GraphNode. If the connection already exists, no connection is created.
- disconnectNode
void disconnectNode(String from, long from_port, String to, long to_port)
Removes the connection between the from_port slot of the from GraphNode and the to_port slot of the to GraphNode. If the connection does not exist, no connection is removed.
- getConnectionList
Array getConnectionList()
Returns an Array containing the list of connections. A connection consists in a structure of the form { from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }.
- getMinimapOpacity
double getMinimapOpacity()
- getMinimapSize
Vector2 getMinimapSize()
- getScrollOfs
Vector2 getScrollOfs()
- getSnap
long getSnap()
- getZoom
double getZoom()
- getZoomHbox
HBoxContainer getZoomHbox()
Gets the HBoxContainer that contains the zooming and grid snap controls in the top left of the graph.
Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of its children, use their CanvasItem.visible property instead.
- isMinimapEnabled
bool isMinimapEnabled()
- isNodeConnected
bool isNodeConnected(String from, long from_port, String to, long to_port)
Returns true if the from_port slot of the from GraphNode is connected to the to_port slot of the to GraphNode.
- isRightDisconnectsEnabled
bool isRightDisconnectsEnabled()
- isUsingSnap
bool isUsingSnap()
- isValidConnectionType
bool isValidConnectionType(long from_type, long to_type)
Returns whether it's possible to connect slots of the specified types.
- opAssign
typeof(null) opAssign(typeof(null) n)
- opEquals
bool opEquals(GraphEdit other)
- opEquals
bool opEquals(typeof(null) n)
- removeValidConnectionType
void removeValidConnectionType(long from_type, long to_type)
Makes it not possible to connect between two different slot types. The type is defined with the GraphNode.setSlot method.
- removeValidLeftDisconnectType
void removeValidLeftDisconnectType(long type)
Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type.
- removeValidRightDisconnectType
void removeValidRightDisconnectType(long type)
Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type.
- setConnectionActivity
void setConnectionActivity(String from, long from_port, String to, long to_port, double amount)
Sets the coloration of the connection between from's from_port and to's to_port with the color provided in the activity theme property.
- setMinimapEnabled
void setMinimapEnabled(bool enable)
- setMinimapOpacity
void setMinimapOpacity(double p_opacity)
- setMinimapSize
void setMinimapSize(Vector2 p_size)
- setRightDisconnects
void setRightDisconnects(bool enable)
- setScrollOfs
void setScrollOfs(Vector2 ofs)
- setSelected
void setSelected(Node node)
Sets the specified node as the one selected.
- setSnap
void setSnap(long pixels)
- setUseSnap
void setUseSnap(bool enable)
- setZoom
void setZoom(double p_zoom)
- toHash
size_t toHash()
- minimapEnabled
bool minimapEnabled [@property getter]
bool minimapEnabled [@property setter]
If true, the minimap is visible.
- minimapOpacity
double minimapOpacity [@property getter]
double minimapOpacity [@property setter]
The opacity of the minimap rectangle.
- minimapSize
Vector2 minimapSize [@property getter]
Vector2 minimapSize [@property setter]
The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
- rightDisconnects
bool rightDisconnects [@property getter]
bool rightDisconnects [@property setter]
If true, enables disconnection of existing connections in the GraphEdit by dragging the right end.
- scrollOffset
Vector2 scrollOffset [@property getter]
Vector2 scrollOffset [@property setter]
- snapDistance
long snapDistance [@property getter]
long snapDistance [@property setter]
The snapping distance in pixels.
- useSnap
bool useSnap [@property getter]
bool useSnap [@property setter]
If true, enables snapping.
- zoom
double zoom [@property getter]
double zoom [@property setter]
GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default. It is greatly advised to enable low-processor usage mode (see OS.lowProcessorUsageMode) when using GraphEdits.