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 one 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; }

If true, the GraphNode is a comment node.

    public Vector2 Offset { get; set; }

The offset of the GraphNode, relative to the scroll offset of the GraphEdit.

Note: 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()

Disables all input and output slots of the GraphNode.

    public void ClearSlot(int idx)

Disables input and output slot whose index is idx.

    public Color GetConnectionInputColor(int idx)

Returns the color of the input connection idx.

    public int GetConnectionInputCount()

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

    public Vector2 GetConnectionInputPosition(int idx)

Returns the position of the input connection idx.

    public int GetConnectionInputType(int idx)

Returns the type of the input connection idx.

    public Color GetConnectionOutputColor(int idx)

Returns the color of the output connection idx.

    public int GetConnectionOutputCount()

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

    public Vector2 GetConnectionOutputPosition(int idx)

Returns the position of the output connection idx.

    public int GetConnectionOutputType(int idx)

Returns the type of the output connection idx.

    [Obsolete("GetOffset is deprecated. Use the Offset property instead.")]
    public Vector2 GetOffset()

Getter for Offset

    [Obsolete("GetOverlay is deprecated. Use the Overlay property instead.")]
    public OverlayEnum GetOverlay()

Getter for Overlay

    public Color GetSlotColorLeft(int idx)

Returns the color set to idx left (input) slot.

    public Color GetSlotColorRight(int idx)

Returns the color set to idx right (output) slot.

    public int GetSlotTypeLeft(int idx)

Returns the (integer) type of left (input) idx slot.

    public int GetSlotTypeRight(int idx)

Returns the (integer) type of right (output) idx slot.

    [Obsolete("GetTitle is deprecated. Use the Title property instead.")]
    public string GetTitle()

Getter for Title

    [Obsolete("IsCloseButtonVisible is deprecated. Use the ShowClose property instead.")]
    public bool IsCloseButtonVisible()

Getter for ShowClose

    [Obsolete("IsComment is deprecated. Use the Comment property instead.")]
    public bool IsComment()

Getter for Comment

    [Obsolete("IsResizable is deprecated. Use the Resizable property instead.")]
    public bool IsResizable()

Getter for Resizable

    [Obsolete("IsSelected is deprecated. Use the Selected property instead.")]
    public bool IsSelected()

Getter for Selected

    public bool IsSlotEnabledLeft(int idx)

Returns true if left (input) slot idx is enabled, false otherwise.

    public bool IsSlotEnabledRight(int idx)

Returns true if right (output) slot idx is enabled, false otherwise.

    [Obsolete("SetComment is deprecated. Use the Comment property instead.")]
    public void SetComment(bool comment)

Setter for Comment

    [Obsolete("SetOffset is deprecated. Use the Offset property instead.")]
    public void SetOffset(Vector2 offset)

Setter for Offset

    [Obsolete("SetOverlay is deprecated. Use the Overlay property instead.")]
    public void SetOverlay(OverlayEnum overlay)

Setter for Overlay

    [Obsolete("SetResizable is deprecated. Use the Resizable property instead.")]
    public void SetResizable(bool resizable)

Setter for Resizable

    [Obsolete("SetSelected is deprecated. Use the Selected property instead.")]
    public void SetSelected(bool selected)

Setter for Selected

    [Obsolete("SetShowCloseButton is deprecated. Use the ShowClose property instead.")]
    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)

    [Obsolete("SetTitle is deprecated. Use the Title property instead.")]
    public void SetTitle(string title)

Setter for Title

Inner Types

OverlayEnum

Name Value Description
Disabled 0  
Breakpoint 1  
Position 2  
Tags: