Context:setregion

Sets the mouse capture region.

Syntax

Signature
Context:setregion(X: number, Y: number, Width: number, Height: number) -> ()

Aliases

This function has no aliases.

Parameters

ParameterTypeDescription
XnumberLeft edge in client pixels.
YnumberTop edge in client pixels.
WidthnumberNonnegative width.
HeightnumberNonnegative height.

Returns

TypeDescription
()None.

Notes

All values must be finite and have an absolute value no greater than 65,536. Width and Height cannot be negative.

Example

Luau
local Context = input.createcontext()
Context:setregion(10, 10, 200, 100)
Context:destroy()