GraphNode¶
Inherits: Container < Control < CanvasItem < Node < Object
类别: 核心
简要说明¶
graphnode是一个具有多个输入和输出插槽的容器,允许在graphnode之间进行连接。插槽可以有不同的、不兼容的类型。
属性¶
假 |
||
矢量2(0,0) |
||
0 |
||
假 |
||
假 |
||
假 |
||
“ |
方法¶
无效 |
clear_all_slots ( ) |
无效 |
clear_slot ( int idx ) |
get_connection_input_color ( int idx ) |
|
get_connection_input_position ( int idx ) |
|
get_connection_input_type ( int idx ) |
|
get_connection_output_color ( int idx ) |
|
get_connection_output_position ( int idx ) |
|
get_connection_output_type ( int idx ) |
|
get_slot_color_left ( int idx ) const |
|
get_slot_color_right ( int idx ) const |
|
get_slot_type_left ( int idx ) const |
|
get_slot_type_right ( int idx ) const |
|
is_slot_enabled_left ( int idx ) const |
|
is_slot_enabled_right ( int idx ) const |
|
无效 |
set_slot ( int idx, bool enable_left, int type_left, Color color_left, bool enable_right, int type_right, Color color_right, Texture custom_left=null, Texture custom_right=null ) |
主题属性¶
断点 |
||
关闭 |
||
close_color |
颜色(0,0,0,1) |
|
close_offset |
18 |
|
评论 |
||
评论焦点 |
||
默认焦点 |
||
默认帧 |
||
框架 |
||
港口 |
||
port_offset |
3 |
|
位置 |
||
调整大小器 |
||
选定的帧 |
||
分离 |
1 |
|
title_color |
颜色(0,0,0,1) |
|
title_font |
||
title_offset |
20 |
信号¶
close_request ( )
关闭graphnode时发送的信号。
拖动graphnode时发送的信号。
offset_changed ( )
移动graphnode时发送的信号。
raise_request ( )
当要求在其他图形模式上显示图形模式时发送的信号。发生在聚焦(点击)图形节点上。
resize_request ( Vector2 new_minsize )
描述¶
graphnode是由标题定义的容器。它可以有一个或多个输入和输出插槽,这些插槽可以启用(显示)或禁用(未显示),并且具有不同的(不兼容)类型。颜色也可以分配给插槽。为graphnode中包含的每个GUI元素定义了一组输入和输出槽。输入和输出连接是左插槽和右插槽,但只有启用的插槽才算作连接。
属性描述¶
bool comment
违约 |
假 |
设定器 |
设置注释(值) |
吸气剂 |
是注释() |
Vector2 offset
违约 |
矢量2(0,0) |
设定器 |
设置偏移(值) |
吸气剂 |
获取偏移量() |
图形节点的偏移量,相对于 GraphEdit .
注: 您不能直接使用职位,因为 GraphEdit 是一个 Container .
Overlay overlay
违约 |
0 |
设定器 |
设置覆盖(值) |
吸气剂 |
获取覆盖图() |
bool resizable
违约 |
假 |
设定器 |
设置可调整大小(值) |
吸气剂 |
可调整大小() |
bool selected
违约 |
假 |
设定器 |
设置“选定”(值) |
吸气剂 |
是否选择了“() |
bool show_close
违约 |
假 |
设定器 |
设置显示关闭按钮(值) |
吸气剂 |
关闭按钮可见吗? |
String title
违约 |
“ |
设定器 |
设置标题(值) |
吸气剂 |
获取标题() |
方法说明¶
void clear_all_slots ( )
禁用图形模式的所有输入和输出插槽。
void clear_slot ( int idx )
禁用索引为的输入和输出插槽 idx
.
返回输入连接的颜色 idx
.
int get_connection_input_count ( )
返回到图形模式的已启用输入插槽(连接)数。
返回输入连接的位置 idx
.
返回输入连接的类型 idx
.
返回输出连接的颜色 idx
.
int get_connection_output_count ( )
返回启用的图形模式输出插槽(连接)数。
返回输出连接的位置 idx
.
返回输出连接的类型 idx
.
将颜色设置为 idx
左(输入)插槽。
将颜色设置为 idx
右(输出)插槽。
返回左(输入)的(整数)类型 idx
狭槽。
返回右(输出)的(整数)类型 idx
狭槽。
返回 true
如果左(输入)槽 idx
已启用, false
否则。
返回 true
如果右(输出)插槽 idx
已启用, false
否则。