@tool YggdrasilNodeButton API
Button control that displays and manages an interactive YggdrasilNode.
Signals
| Name |
|---|
| node_hovered(node: YggdrasilNodeButton, is_hovered: bool) |
Properties
| Type | Name | Default |
|---|---|---|
| YggdrasilTree | tree | null |
| YggdrasilTreeView | tree_view | null |
| YggdrasilNode | node_data | null |
| YggdrasilPrefab | prefab | null |
| bool | is_mouse_over | false |
| bool | preallocated | false |
| bool | refund | false |
| bool | allocated | false |
| AllocationState | state | NORMAL |
| bool | is_root | false |
| int | id | 0 |
| String | reference_id | "" |
| String | node_name | "" |
| String | description | "" |
| NodeType | type | SMALL |
| Texture2D | icon | null |
| Texture2D | border_normal | null |
| Texture2D | border_intermediate | null |
| Texture2D | border_active | null |
| Array | out_nodes | [] |
| Array | in_nodes | [] |
| Dictionary | line_data | {} |
| Dictionary | attributes | {} |
| bool | locked | false |
Methods
| Type | Name |
|---|---|
| String | format_tooltip() |
| void | set_state(new_state: AllocationState) |
Signal Descriptions
node_hovered(node: YggdrasilNodeButton, is_hovered: bool)
Emitted when the mouse enters or exits the node button.
Property Descriptions
YggdrasilTree tree = null
Tree resource this node belongs to.
YggdrasilTreeView tree_view = null
Tree view that owns this node button.
YggdrasilNode node_data = null
Backing node resource for this button.
YggdrasilPrefab prefab = null
Prefab associated with this node button.
bool is_mouse_over = false
Tracks whether the mouse is currently over the node.
bool preallocated = false
Whether the node is currently preallocated.
bool refund = false
Whether the node is currently staged for refund.
bool allocated = false
Whether the node is currently allocated.
AllocationState state = NORMAL
Current allocation display state of the node.
bool is_root
Proxy property for
node_data.is_root.
int id
Proxy property for
node_data.id.
String reference_id
Proxy property for
node_data.reference_id.
String node_name
Proxy property for
node_data.name.
String description
Proxy property for
node_data.description.
NodeType type
Proxy property for
node_data.type.
Texture2D icon
Proxy property for
node_data.icon.
Texture2D border_normal
Proxy property for
node_data.border_normal.
Texture2D border_intermediate
Proxy property for
node_data.border_intermediate.
Texture2D border_active
Proxy property for
node_data.border_active.
Array out_nodes
Proxy property for
node_data.out_nodes.
Array in_nodes
Proxy property for
node_data.in_nodes.
Dictionary line_data
Proxy property for
node_data.line_data.
Dictionary attributes
Proxy property for
node_data.attributes.
bool locked
Proxy property for
node_data.locked.
Method Descriptions
String format_tooltip()
Builds and returns formatted rich text tooltip content using the node name, attributes, and description.
void set_state(new_state: AllocationState)
Updates the node allocation state, border appearance, and visibility according to
new_state.