GraphNode

Inherits: Container < Control < CanvasItem < Node < Object

类别: 核心

简要说明

graphnode是一个具有多个输入和输出插槽的容器,允许在graphnode之间进行连接。插槽可以有不同的、不兼容的类型。

属性

bool

comment

Vector2

offset

矢量2(0,0)

Overlay

overlay

0

bool

resizable

bool

selected

bool

show_close

String

title

方法

无效

clear_all_slots ( )

无效

clear_slot ( int idx )

Color

get_connection_input_color ( int idx )

int

get_connection_input_count ( )

Vector2

get_connection_input_position ( int idx )

int

get_connection_input_type ( int idx )

Color

get_connection_output_color ( int idx )

int

get_connection_output_count ( )

Vector2

get_connection_output_position ( int idx )

int

get_connection_output_type ( int idx )

Color

get_slot_color_left ( int idx ) const

Color

get_slot_color_right ( int idx ) const

int

get_slot_type_left ( int idx ) const

int

get_slot_type_right ( int idx ) const

bool

is_slot_enabled_left ( int idx ) const

bool

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 )

主题属性

StyleBox

断点

Texture

关闭

Color

close_color

颜色(0,0,0,1)

int

close_offset

18

StyleBox

评论

StyleBox

评论焦点

StyleBox

默认焦点

StyleBox

默认帧

StyleBox

框架

Texture

港口

int

port_offset

3

StyleBox

位置

Texture

调整大小器

StyleBox

选定的帧

int

分离

1

Color

title_color

颜色(0,0,0,1)

Font

title_font

int

title_offset

20

信号

  • close_request ( )

关闭graphnode时发送的信号。

拖动graphnode时发送的信号。

  • offset_changed ( )

移动graphnode时发送的信号。

  • raise_request ( )

当要求在其他图形模式上显示图形模式时发送的信号。发生在聚焦(点击)图形节点上。

  • resize_request ( Vector2 new_minsize )

枚举

枚举 覆盖

  • OVERLAY_DISABLED = 0

  • OVERLAY_BREAKPOINT = 1

  • OVERLAY_POSITION = 2

描述

graphnode是由标题定义的容器。它可以有一个或多个输入和输出插槽,这些插槽可以启用(显示)或禁用(未显示),并且具有不同的(不兼容)类型。颜色也可以分配给插槽。为graphnode中包含的每个GUI元素定义了一组输入和输出槽。输入和输出连接是左插槽和右插槽,但只有启用的插槽才算作连接。

属性描述

违约

设定器

设置注释(值)

吸气剂

是注释()

违约

矢量2(0,0)

设定器

设置偏移(值)

吸气剂

获取偏移量()

图形节点的偏移量,相对于 GraphEdit .

注: 您不能直接使用职位,因为 GraphEdit 是一个 Container .

违约

0

设定器

设置覆盖(值)

吸气剂

获取覆盖图()

违约

设定器

设置可调整大小(值)

吸气剂

可调整大小()

违约

设定器

设置“选定”(值)

吸气剂

是否选择了“()

违约

设定器

设置显示关闭按钮(值)

吸气剂

关闭按钮可见吗?

违约

设定器

设置标题(值)

吸气剂

获取标题()

方法说明

  • void clear_all_slots ( )

禁用图形模式的所有输入和输出插槽。

  • void clear_slot ( int idx )

禁用索引为的输入和输出插槽 idx .

  • Color get_connection_input_color ( int idx )

返回输入连接的颜色 idx .

  • int get_connection_input_count ( )

返回到图形模式的已启用输入插槽(连接)数。

  • Vector2 get_connection_input_position ( int idx )

返回输入连接的位置 idx .

  • int get_connection_input_type ( int idx )

返回输入连接的类型 idx .

  • Color get_connection_output_color ( int idx )

返回输出连接的颜色 idx .

  • int get_connection_output_count ( )

返回启用的图形模式输出插槽(连接)数。

  • Vector2 get_connection_output_position ( int idx )

返回输出连接的位置 idx .

  • int get_connection_output_type ( int idx )

返回输出连接的类型 idx .

  • Color get_slot_color_left ( int idx ) const

将颜色设置为 idx 左(输入)插槽。

  • Color get_slot_color_right ( int idx ) const

将颜色设置为 idx 右(输出)插槽。

  • int get_slot_type_left ( int idx ) const

返回左(输入)的(整数)类型 idx 狭槽。

  • int get_slot_type_right ( int idx ) const

返回右(输出)的(整数)类型 idx 狭槽。

  • bool is_slot_enabled_left ( int idx ) const

返回 true 如果左(输入)槽 idx 已启用, false 否则。

  • bool is_slot_enabled_right ( int idx ) const

返回 true 如果右(输出)插槽 idx 已启用, false 否则。