神岛 API 文档 - ArenaPro版
    Preparing search index...

    UI可渲染的基类

    Base class for UI renderables

    Hierarchy (View Summary)

    Index

    Properties

    anchor: Vec2

    节点的锚点,用于确定节点的位置。

    The anchor of the node, used to determine the position of the node.

    autoResize: "X" | "Y" | "NONE" | "XY"

    节点的自动调整尺寸的方式。

    The way the node automatically resizes.

    backgroundColor: Vec3

    节点的背景颜色。

    The background color of the node.

    backgroundOpacity: number

    节点的背景透明度。

    The background opacity of the node.

    children: readonly UiNode[]

    节点的子节点。如需要调整子节点结构,应修改子节点的parent属性。

    The child nodes of this node. To adjust the child node structure, you should modify the parent property of the child node.

    clone: () => this

    克隆节点,包括其子节点。

    Clones the node, including its children.

    管理节点相关的事件。

    Manages events related to the node.

    name: string

    该节点的标识,可重复。

    The identifier of this node, can be repeated.

    parent: UiNode

    节点的父节点,非根节点的父节点为空时,该节点将不会被渲染。

    The parent node of this node. If the parent of a non-root node is empty, the node will not be rendered.

    pointerEventBehavior: PointerEventBehavior

    配置鼠标指针事件的响应方式

    Configures the response method for mouse pointer events

    position: Coord2

    节点的位置,相对于父节点的位置。

    The position of the node, relative to the parent node.

    rotation: number

    节点的旋转(角度)

    The rotation of the node (in degrees).

    size: Coord2

    节点的尺寸。

    The size of the node.

    uiScale: UiScale

    节点等比例缩放数据。

    Node proportional scaling data.

    visible: boolean

    节点的可见性。

    The visibility of the node.

    zIndex: number

    节点的层级,用于确定节点的渲染顺序。

    The z-index of the node, used to determine the rendering order.

    Methods