A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.
    public class GraphNode : Container

A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections.

Inheritance Chain

Constructors

    public GraphNode()

Signals

    "close_request" ()

Signal sent on closing the GraphNode.

    "dragged" (Vector2 from, Vector2 to)

Signal sent when the GraphNode is dragged.

    "offset_changed" ()

Signal sent when the GraphNode is moved.

    "raise_request" ()

Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.

    "resize_request" (Vector2 new_minsize)

Properties

    public bool Comment { get; set; }

    public Vector2 Offset { get; set; }

The offset of the GraphNode, relative to the scroll offset of the GraphEdit. Note that you cannot use position directly, as GraphEdit is a Container.

    public OverlayEnum Overlay { get; set; }

    public bool Resizable { get; set; }

    public bool Selected { get; set; }

    public bool ShowClose { get; set; }

    public string Title { get; set; }

Methods

    public void ClearAllSlots()

Disable all input and output slots of the GraphNode.

    public void ClearSlot(int idx)

Disable input and output slot whose index is ‘idx’.

    public Color GetConnectionInputColor(int idx)

Return the color of the input connection ‘idx’.

    public int GetConnectionInputCount()

Return the number of enabled input slots (connections) to the GraphNode.

    public Vector2 GetConnectionInputPosition(int idx)

Return the position of the input connection ‘idx’.

    public int GetConnectionInputType(int idx)

Return the type of the input connection ‘idx’.

    public Color GetConnectionOutputColor(int idx)

Return the color of the output connection ‘idx’.

    public int GetConnectionOutputCount()

Return the number of enabled output slots (connections) of the GraphNode.

    public Vector2 GetConnectionOutputPosition(int idx)

Return the position of the output connection ‘idx’.

    public int GetConnectionOutputType(int idx)

Return the type of the output connection ‘idx’.

    public Vector2 GetOffset()

Getter for Offset

    public OverlayEnum GetOverlay()

Getter for Overlay

    public Color GetSlotColorLeft(int idx)

Return the color set to ‘idx’ left (input) slot.

    public Color GetSlotColorRight(int idx)

Return the color set to ‘idx’ right (output) slot.

    public int GetSlotTypeLeft(int idx)

Return the (integer) type of left (input) ‘idx’ slot.

    public int GetSlotTypeRight(int idx)

Return the (integer) type of right (output) ‘idx’ slot.

    public string GetTitle()

Getter for Title

    public bool IsCloseButtonVisible()

Getter for ShowClose

    public bool IsComment()

Getter for Comment

    public bool IsResizable()

Getter for Resizable

    public bool IsSelected()

Getter for Selected

    public bool IsSlotEnabledLeft(int idx)

Return true if left (input) slot ‘idx’ is enabled. False otherwise.

    public bool IsSlotEnabledRight(int idx)

Return true if right (output) slot ‘idx’ is enabled. False otherwise.

    public void SetComment(bool comment)

Setter for Comment

    public void SetOffset(Vector2 offset)

Setter for Offset

    public void SetOverlay(OverlayEnum overlay)

Setter for Overlay

    public void SetResizable(bool resizable)

Setter for Resizable

    public void SetSelected(bool selected)

Setter for Selected

    public void SetShowCloseButton(bool show)

Setter for ShowClose

    public void SetSlot(int idx, bool enableLeft, int typeLeft, Color colorLeft, bool enableRight, int typeRight, Color colorRight, Texture customLeft = null, Texture customRight = null)

    public void SetTitle(string title)

Setter for Title

Inner Types

OverlayEnum

Name Value Description
Disabled 0  
Breakpoint 1  
Position 2  
Tags: