Inheritance #

GraphElement

- GraphFrame
- GraphNode
Table of contents

GraphElement #

is_instantiable, Node, core, not_builtin_classes

A container that represents a basic element that can be placed inside a GraphEdit control.

GraphElement allows to create custom elements for a GraphEdit graph. By default such elements can be selected, resized, and repositioned, but they cannot be connected. For a graph element that allows for connections see GraphNode.

Members #

var draggable: bool = true#

If true, the user can drag the GraphElement.

var position_offset: Vector2 = Vector2(0, 0)#

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

var resizable: bool = false#

If true, the user can resize the GraphElement.

Note: Dragging the handle will only emit the resize_request and resize_end signals, the GraphElement needs to be resized manually.

var selectable: bool = true#

If true, the user can select the GraphElement.

var selected: bool = false#

If true, the GraphElement is selected.

Methods #

Annotations #

Constants #

Constructors #

Enums #

Operators #

Signals #

signal delete_request()#

Emitted when removing the GraphElement is requested.

signal dragged(to: Vector2)#

Emitted when the GraphElement is dragged.

signal node_deselected()#

Emitted when the GraphElement is deselected.

signal node_selected()#

Emitted when the GraphElement is selected.

signal position_offset_changed()#

Emitted when the GraphElement is moved.

signal raise_request()#

Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.

signal resize_end(new_size: Vector2)#

Emitted when releasing the mouse button after dragging the resizer handle (see resizable).

signal resize_request(new_size: Vector2)#

Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see resizable).

Theme Items #

self["theme_override_icons/resizer"] = icon as Texture2D#

The icon used for the resizer, visible when resizable is enabled.

Tutorials #