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
| Parameter | Type | Description |
|---|---|---|
X | number | Left edge in client pixels. |
Y | number | Top edge in client pixels. |
Width | number | Nonnegative width. |
Height | number | Nonnegative height. |
Returns
| Type | Description |
|---|---|
() | 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()