Skip to content

IsMouseCaptured

Whether the script holds the mouse.

true from SetMouseCapture(true) until the mouse is given back: by the script, a reload of the scripts, the end of the session, or a click nothing of the script heard.

IsMouseCaptured()

boolean - true while the script holds the mouse

function OnKey(key, pressed)
if pressed and key == "escape" and IsMouseCaptured() then
HideUiElement("bank")
SetMouseCapture(false)
end
end

SetMouseCapture · the The game’s UI for a script group of the index