GraphElement
实验性: This class may be changed or removed in future versions.
继承: Container
< Control
< CanvasItem
< Node
< Object
派生: GraphFrame
, GraphNode
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
.
属性
主题属性
信号
delete_request ( )
Emitted when removing the GraphElement is requested.
dragged ( from: Vector2
, to: Vector2
)
Emitted when the GraphElement is dragged.
node_deselected ( )
Emitted when the GraphElement is deselected.
node_selected ( )
Emitted when the GraphElement is selected.
position_offset_changed ( )
Emitted when the GraphElement is moved.
raise_request ( )
Emitted when displaying the GraphElement over other ones is requested. Happens on focusing (clicking into) the GraphElement.
resize_end ( new_size: Vector2
)
Emitted when releasing the mouse button after dragging the resizer handle (see resizable
).
resize_request ( new_size: Vector2
)
Emitted when resizing the GraphElement is requested. Happens on dragging the resizer handle (see resizable
).
属性说明
bool
draggable = true
If true
, the user can drag the GraphElement.
Vector2
position_offset = Vector2(0, 0)
The offset of the GraphElement, relative to the scroll offset of the GraphEdit
.
bool
resizable = 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.
bool
selectable = true
If true
, the user can select the GraphElement.
bool
selected = false
If true
, the GraphElement is selected.
主题属性说明
Texture2D
resizer
The icon used for the resizer, visible when resizable
is enabled.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。