Class GraphElement
A container that represents a basic element that can be placed inside a GraphEdit control.
- Inheritance
-
GraphElement
- Derived
Remarks
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.
Properties
draggable
If true
, the user can drag the GraphElement.
var draggable : bool = true
Property Value
Remarks
position_offset
The offset of the GraphElement, relative to the scroll offset of the GraphEdit.
var position_offset : Vector2 = Vector2(0, 0)
Property Value
Remarks
resizable
If true
, the user can resize the GraphElement.
Note: Dragging the handle will only emit the GraphElement.resize_request and GraphElement.resize_end signals, the GraphElement needs to be resized manually.
var resizable : bool = false
Property Value
Remarks
selectable
If true
, the user can select the GraphElement.
var selectable : bool = true
Property Value
Remarks
selected
If true
, the GraphElement is selected.
var selected : bool = false
Property Value
Remarks
resizer
Theme Property
The icon used for the resizer, visible when resizable is enabled.
Texture2D resizer
Property Value
Events
delete_request
Emitted when removing the GraphElement is requested.
signal delete_request
dragged(Vector2, Vector2)
Emitted when the GraphElement is dragged.
signal dragged(Vector2 from, Vector2 to)
Parameters
node_deselected
Emitted when the GraphElement is deselected.
signal node_deselected
node_selected
Emitted when the GraphElement is selected.
signal node_selected
position_offset_changed
Emitted when the GraphElement is moved.
signal position_offset_changed
raise_request
Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.
signal raise_request
resize_end(Vector2)
Emitted when releasing the mouse button after dragging the resizer handle (see resizable).
signal resize_end(Vector2 new_size)
Parameters
new_size
Vector2
resize_request(Vector2)
Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see resizable).
signal resize_request(Vector2 new_size)
Parameters
new_size
Vector2