OnClientRestore: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Category:Incomplete Event {{Client event}} __NOTOC__ This event is triggered when the local player restores the game screen from a previously minimized state. ==Parameters=...") |
m (Category mismatch fixed) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Client event}} | {{Client event}} | ||
__NOTOC__ | __NOTOC__ | ||
Line 6: | Line 5: | ||
==Parameters== | ==Parameters== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool | bool didClearRenderTargets | ||
</syntaxhighlight> | </syntaxhighlight> | ||
*''' | *'''didClearRenderTargets:''' A bool specifying whether all render targets have been cleared as part of the restore process. Generally, restoring in full screen mode will clear render targets. | ||
==Example== | ==Example== | ||
This example shows how to cope with life's little upsets | This example shows how to cope with life's little upsets | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function handleRestore( | function handleRestore( didClearRenderTargets ) | ||
if | if didClearRenderTargets then | ||
-- Do any work here to restore render target contents as required | -- Do any work here to restore render target contents as required | ||
end | end | ||
end | end | ||
addEventHandler("onClientRestore", | addEventHandler("onClientRestore",root,handleRestore) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Latest revision as of 17:23, 11 November 2014
This event is triggered when the local player restores the game screen from a previously minimized state.
Parameters
bool didClearRenderTargets
- didClearRenderTargets: A bool specifying whether all render targets have been cleared as part of the restore process. Generally, restoring in full screen mode will clear render targets.
Example
This example shows how to cope with life's little upsets
function handleRestore( didClearRenderTargets ) if didClearRenderTargets then -- Do any work here to restore render target contents as required end end addEventHandler("onClientRestore",root,handleRestore)
See Also
Other client 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