GraphElement
實驗性: This class may be changed or removed in future versions.
繼承: Container < Control < CanvasItem < Node < Object
被繼承: GraphFrame, GraphNode
帶有連接埠的容器,代表 GraphEdit 中的一個節點。
說明
GraphElement 允許為 GraphEdit 圖表建立自訂元素。預設情況下,可以選擇此類元素、調整大小和重新定位,但無法連接它們。對於允許連接,請參閱GraphNode。
屬性
|
||
|
||
|
||
|
||
|
主題屬性
訊號
delete_request() 🔗
需要對子節點進行排序時發出。
dragged(from: Vector2, to: Vector2) 🔗
當 GraphNode 被拖動時發出。
node_deselected() 🔗
當 GraphNode 被取消選擇時發出。
node_selected() 🔗
當 GraphNode 被選中時發出。
position_offset_changed() 🔗
當 GraphNode 被移動時觸發。
raise_request() 🔗
當 GraphNode 被要求顯示在其他節點之上時觸發。在 GraphNode 獲得焦點時觸發,即滑鼠點擊進入。
resize_end(new_size: Vector2) 🔗
Emitted when releasing the mouse button after dragging the resizer handle (see resizable).
resize_request(new_size: Vector2) 🔗
當 GraphNode 被要求調整大小時發出。在拖動調整器手柄時發生(見 resizable)。
屬性說明
如果為 true,則使用者能夠拖動該 GraphNode。
Vector2 position_offset = Vector2(0, 0) 🔗
GraphNode 的偏移量,相對於 GraphEdit 的滾動偏移量。
注意:不能直接使用位置偏移,因為 GraphEdit 是一個 Container。
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.
如果為 true,則使用者能夠選中該 GraphNode。
如果為 true,則該 GraphNode 被選中。
主題屬性說明
用於調整大小的圖示,在 resizable 被啟用時可見。