SvgSetUpdateCallback: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Add svgSetUpdateCallback page)
 
mNo edit summary
Line 5: Line 5:


===Required Arguments===
===Required Arguments===
*'''svgElement:''' The [[svg]] you want to get the size of.
*'''svgElement:''' The [[svg]] you want to set the callback function of.
*'''callback:''' The callback function to store on the SVG. If '''false''' is provided, any existing callback function will be removed from the SVG.
*'''callback:''' The callback function to store on the SVG. If '''false''' is provided, any existing callback function will be removed from the SVG.


Line 15: Line 15:


==Requirements==
==Requirements==
{{Requirements|n/a|1.5.8-9.20979|}}
{{Requirements|n/a|1.5.8-9.21155|}}


==See Also==
==See Also==
{{SVG_functions}}
{{SVG_functions}}
[[pt-br:svgGetSize]]

Revision as of 23:23, 8 April 2022

Sets the update callback of an svg element

Syntax

bool svgSetUpdateCallback( svg svgElement, function / bool callback )

Required Arguments

  • svgElement: The svg you want to set the callback function of.
  • callback: The callback function to store on the SVG. If false is provided, any existing callback function will be removed from the SVG.

Returns

  • Returns true if successful, false otherwise

Example

For example of callback usage, see svgSetSize or svgSetDocumentXML.

Requirements

Minimum server version n/a
Minimum client version 1.5.8-9.21155

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version client="1.5.8-9.21155" />

See Also