OnClientMTAFocusChange
Jump to navigation
Jump to search
This event is triggered every time the MTA window gains or loses focus.
Parameters
bool windowFocused
- windowFocused: A boolean, indicating whether the MTA window is focused or not.
Source
The source of this event is the root element.
Example
This example prints message on chat with focus state:
function onClientMTAFocusChange(windowFocused) local focusedText = windowFocused and "MTA has gained focus." or "MTA has lost focus." outputChatBox(focusedText) end addEventHandler("onClientMTAFocusChange", root, onClientMTAFocusChange)
Requirements
This template will be deleted.
See Also
Client other events
- onClientChatMessage
- onClientConsole
- onClientDebugMessage
- onClientExplosion
- onClientFileDownloadComplete
- onClientHUDRender
- onClientMinimize
- onClientMTAFocusChange
- onClientPedsProcessed
- onClientPlayerNetworkStatus
- onClientPreRender
- onClientRender
- onClientRestore
- onClientTransferBoxProgressChange
- onClientTransferBoxVisibilityChange
- onClientWorldSound
Client event functions
- triggerLatentServerEvent
- triggerServerEvent
- Shared
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled