Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GraphElement
实验性: This class may be changed or removed in future versions.
继承: Container < Control < CanvasItem < Node < Object
派生: GraphFrame, GraphNode
表示可以放置在 GraphEdit 控件内的基本元素的容器。
描述
GraphElement 允许为 GraphEdit 图表创建自定义元素。默认情况下,可以此类元素可以被选择、调整大小和重新定位,但它们无法被连接。对于允许连接的图形元素,请参阅 GraphNode。
属性
|
||
|
||
|
||
|
||
|
主题属性
信号
delete_request() 🔗
请求删除 GraphElement 时发出。
dragged(from: Vector2, to: Vector2) 🔗
当 GraphElement 被拖动时发出。
node_deselected() 🔗
当 GraphElement 被取消选择时发出。
node_selected() 🔗
当 GraphElement 被选中时发出。
position_offset_changed() 🔗
当 GraphElement 被移动时触发。
raise_request() 🔗
当 GraphElement 被要求显示在其他节点之上时触发。在 GraphElement 获得焦点(鼠标点击进入)时触发。
resize_end(new_size: Vector2) 🔗
拖动调整大小手柄后释放鼠标按钮时发出(见 resizable)。
resize_request(new_size: Vector2) 🔗
当 GraphElement 被要求调整大小时发出。在拖动调整器手柄时发生(见 resizable)。
属性说明
如果为 true
,则用户能够拖动该 GraphElement。
Vector2 position_offset = Vector2(0, 0)
🔗
GraphElement 的偏移量,相对于 GraphEdit 的滚动偏移量。
如果为 true
,则用户可以调整 GraphElement 的大小。
注意:拖动手柄只会发出 resize_request 和 resize_end 信号,GraphElement 需要手动调整大小。
如果为 true
,则用户能够选中该 GraphElement。
如果为 true
,则选中该 GraphElement 。
主题属性说明
用于调整大小的图标,在 resizable 被启用时可见。