Skip to content
M2O Scripting APIScripting reference
Runtime classClient APIGenerated

Render2DText

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

Native retained text region.

new Render2DText(): Render2DText

Render2DText

Render2DNode.constructor

bringToFront(): boolean

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

Moves this node to the front of its siblings.

boolean

Render2DNode.bringToFront


destroy(): boolean

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

Destroys this node and all descendants.

boolean

Render2DNode.destroy


moveBefore(sibling): boolean

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

Moves this node before a sibling.

Render2DNode

boolean

Render2DNode.moveBefore


sendToBack(): boolean

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

Moves this node behind its siblings.

boolean

Render2DNode.sendToBack


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

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

Sets the normalized clipping rectangle.

number

number

number

number

boolean

Render2DNode.setClipRect


setParent(parent): boolean

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

Moves this node under a container or the canvas root.

Render2DContainer | null

boolean

Render2DNode.setParent

readonly canvasId: number

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

Owning canvas identifier.

Render2DNode.canvasId


clipping: boolean

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

Node clipping state.

Render2DNode.clipping


readonly clipRect: Render2DRect

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

Current normalized clipping rectangle.

Render2DNode.clipRect


color: Color

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

Normalized RGBA text color.


readonly destroyed: boolean

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

Whether this handle is no longer valid.

Render2DNode.destroyed


font: string

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

Native font hash name.


fontHeight: number

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

Normalized font height.


fontScale: number

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

Font scale multiplier.


fontStyle: "bold" | "normal" | "italic" | "boldItalic"

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

Native font variant.


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

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

Horizontal alignment.


readonly id: number

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

Opaque node identifier.

Render2DNode.id


kerning: boolean

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

Whether kerning is enabled.


nonOverlapGroup: number

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

Native non-overlap group.

Render2DNode.nonOverlapGroup


offset: Vector2

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

Text cursor offset.


readonly parentId: number

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

Parent node identifier, or zero for the canvas root.

Render2DNode.parentId


pixelClipping: boolean

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

Pixel clipping state.

Render2DNode.pixelClipping


position: Vector2

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

Normalized position local to the parent.

Render2DNode.position


size: Vector2

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

Normalized node size.

Render2DNode.size


text: string

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

Displayed text.


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

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

Native node type.

Render2DNode.type


useAllMonitors: boolean

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

Whether the node spans all monitors.

Render2DNode.useAllMonitors


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

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

Vertical alignment.


visible: boolean

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

Node visibility.

Render2DNode.visible


widthLimit: number | null

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

Normalized width limit, or null when disabled.