ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setCursorType

Function

setCursorType

ClientCursorTrilogy Hub only

Changes the game cursor shape. Without an argument the cursor goes back to changing shape by itself: over a link in a browser it turns into a hand, over a text field into an I-beam.

Syntax

bool setCursorType([string name = nil])

Arguments

namestring, optional = nil
"arrow", "hand", "text", "crosshair", "move", "wait", "progress", "help", "no", "sizewe", "sizens", "sizenesw", "sizenwse" or "none" (cursor hidden, controls still blocked).

Returns

true on success, false for an unknown name.

Example

addEventHandler("onClientGUIMouseDown", root, function()
    setCursorType("move")
end)
addEventHandler("onClientGUIMouseUp", root, function()
    setCursorType()
end)

See also