Skip to content
M2O Scripting APIScripting reference
Data shapeClient APIGenerated

Render2DText

Defined in: client/api.d.ts:520

Native retained text region.

bringToFront(): boolean

Defined in: client/api.d.ts:484

Moves this node to the front of its siblings.

boolean

Render2DNode.bringToFront


destroy(): boolean

Defined in: client/api.d.ts:494

Destroys this node and all descendants.

boolean

Render2DNode.destroy


moveBefore(sibling): boolean

Defined in: client/api.d.ts:479

Moves this node before a sibling.

Render2DNode

boolean

Render2DNode.moveBefore


sendToBack(): boolean

Defined in: client/api.d.ts:489

Moves this node behind its siblings.

boolean

Render2DNode.sendToBack


setClipRect(left, top, right, bottom): boolean

Defined in: client/api.d.ts:469

Sets the normalized clipping rectangle.

number

number

number

number

boolean

Render2DNode.setClipRect


setParent(parent): boolean

Defined in: client/api.d.ts:474

Moves this node under a container or the canvas root.

Render2DContainer | null

boolean

Render2DNode.setParent

readonly canvasId: number

Defined in: client/api.d.ts:409

Owning canvas identifier.

Render2DNode.canvasId


clipping: boolean

Defined in: client/api.d.ts:444

Node clipping state.

Render2DNode.clipping


readonly clipRect: Render2DRect

Defined in: client/api.d.ts:464

Current normalized clipping rectangle.

Render2DNode.clipRect


color: Color

Defined in: client/api.d.ts:529

Normalized RGBA text color.


readonly destroyed: boolean

Defined in: client/api.d.ts:424

Whether this handle is no longer valid.

Render2DNode.destroyed


font: string

Defined in: client/api.d.ts:534

Native font hash name.


fontHeight: number

Defined in: client/api.d.ts:539

Normalized font height.


fontScale: number

Defined in: client/api.d.ts:544

Font scale multiplier.


horizontalAlign: "left" | "center" | "right"

Defined in: client/api.d.ts:564

Horizontal alignment.


readonly id: number

Defined in: client/api.d.ts:404

Opaque node identifier.

Render2DNode.id


kerning: boolean

Defined in: client/api.d.ts:559

Whether kerning is enabled.


nonOverlapGroup: number

Defined in: client/api.d.ts:459

Native non-overlap group.

Render2DNode.nonOverlapGroup


offset: Vector2

Defined in: client/api.d.ts:549

Text cursor offset.


readonly parentId: number

Defined in: client/api.d.ts:414

Parent node identifier, or zero for the canvas root.

Render2DNode.parentId


pixelClipping: boolean

Defined in: client/api.d.ts:449

Pixel clipping state.

Render2DNode.pixelClipping


position: Vector2

Defined in: client/api.d.ts:434

Normalized position local to the parent.

Render2DNode.position


size: Vector2

Defined in: client/api.d.ts:439

Normalized node size.

Render2DNode.size


text: string

Defined in: client/api.d.ts:524

Displayed text.


readonly type: "text" | "container" | "rectangle" | "texture"

Defined in: client/api.d.ts:419

Native node type.

Render2DNode.type


useAllMonitors: boolean

Defined in: client/api.d.ts:454

Whether the node spans all monitors.

Render2DNode.useAllMonitors


verticalAlign: "center" | "top" | "bottom"

Defined in: client/api.d.ts:569

Vertical alignment.


visible: boolean

Defined in: client/api.d.ts:429

Node visibility.

Render2DNode.visible


widthLimit: number | null

Defined in: client/api.d.ts:554

Normalized width limit, or null when disabled.