Controls
constControls:object
Defined in: client/api.d.ts:3251
Whether this client’s gameplay input reaches the game, and whether the mod draws a pointer.
A focused web view takes both already, so a panel opened with Web.focusView needs nothing here. This is for what focus cannot say: a pointer without freezing the player, a freeze without a pointer, or no pointer at all for a page that draws its own.
Every hold is counted and belongs to the resource that took it, so two resources cannot release each other’s, and one that stops gives back exactly what it took.
Type Declaration
Section titled “Type Declaration”disable()
Section titled “disable()”disable():
void
Takes this client’s gameplay input away from the game without drawing a pointer. The camera stops turning and the character stops moving.
Returns
Section titled “Returns”void
enable()
Section titled “enable()”enable():
void
Gives back one hold taken by disable. Input returns once nothing else holds it – a focused panel, the chat line, an overlay.
Returns
Section titled “Returns”void
hideCursor()
Section titled “hideCursor()”hideCursor():
void
Gives back one hold taken by showCursor.
Returns
Section titled “Returns”void
isCursorVisible()
Section titled “isCursorVisible()”isCursorVisible():
boolean
Whether the mod’s pointer is drawn right now.
Returns
Section titled “Returns”boolean
True while anything holds it, this resource or not.
isEnabled()
Section titled “isEnabled()”isEnabled():
boolean
Whether gameplay input is reaching the game right now.
Returns
Section titled “Returns”boolean
False while anything holds it, this resource or not.
showCursor()
Section titled “showCursor()”showCursor():
void
Draws the mod’s pointer without taking input. Its shape follows the topmost focused page, so a page’s own cursor styling is what the player sees.
Returns
Section titled “Returns”void