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

    UI盒子

    Hierarchy (View Summary)

    Index

    Properties

    anchor: Vec2

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

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

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

    backgroundColor: Vec3

    节点的背景颜色。

    backgroundOpacity: number

    节点的背景透明度。

    children: readonly UiNode[]

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

    clone: () => this

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

    事件管理器。

    name: string

    该节点的标识,可重复。

    parent: UiNode

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

    pointerEventBehavior: PointerEventBehavior

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

    position: Coord2

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

    rotation: number

    节点的旋转(角度)

    size: Coord2

    节点的尺寸。

    uiScale: UiScale

    节点等比例缩放数据。

    visible: boolean

    节点的可见性。

    zIndex: number

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

    Methods