WindowMove

View source

Captures the position reported by a window movement event.

The event value stores the supplied numeric coordinates in a reusable Vector2 position field. It contains the payload at event-creation time, so consumers can read the coordinates without retaining the source window event.

Examples

const move = new WindowMove(320, 180)
console.log(move.position.x, move.position.y) // 320 180

Constructor


constructor(x: number, y: number)

View source

Creates a window movement event value with the supplied coordinates stored in position.

Parameters

NameDescriptionDefault
x

Horizontal window coordinate.

—
y

Vertical window coordinate.

—

Properties


readonlyposition: Vector2

View source

Window coordinates copied from the constructor’s x and y arguments into Vector2.

Default: ...