OnClientRestore: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Incomplete Event]]
{{Client event}}
{{Client event}}
__NOTOC__  
__NOTOC__  
Line 9: Line 8:
</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.
*'''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.
==Source==
The source of this event is [[root]] element.


==Example==
==Example==
Line 18: Line 21:
     end
     end
end
end
addEventHandler("onClientRestore",getLocalPlayer(),handleRestore)
addEventHandler("onClientRestore",root,handleRestore)
</syntaxhighlight>
</syntaxhighlight>



Latest revision as of 16:15, 29 May 2025

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.

Source

The source of this event is root element.


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


Client event functions