bringToFront: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (Text replacement - "source>" to "syntaxhighlight>") |
||
Line 10: | Line 10: | ||
bringToFront(id) | bringToFront(id) | ||
bringToFront(id, mapname) | bringToFront(id, mapname) | ||
</ | </syntaxhighlight> | ||
'''Parameter''' | '''Parameter''' | ||
{{param|id|The token {{code|id}} or name of the token to effect, defaults to the [[Current Token]]. {{TrustedParameter}} }} | {{param|id|The token {{code|id}} or name of the token to effect, defaults to the [[Current Token]]. {{TrustedParameter}} }} | ||
Line 20: | Line 20: | ||
<!-- Make sure that we are visible above all other tokens on the same layer --> | <!-- Make sure that we are visible above all other tokens on the same layer --> | ||
[h: bringToFront()] | [h: bringToFront()] | ||
</ | </syntaxhighlight> | ||
Line 26: | Line 26: | ||
<!-- The Hero of the piece should always stand out --> | <!-- The Hero of the piece should always stand out --> | ||
[h: bringToFront("Hero")] | [h: bringToFront("Hero")] | ||
</ | </syntaxhighlight> | ||
|also= | |also= |
Revision as of 17:05, 14 March 2023
bringToFront() Function
• Introduced in version 1.3b48
Adjust the z order (or draw order) of the Token so that is is drawn after all other Tokens on the same Map Layer, this has the effect of making the Token appear to be in front of the other Tokens as it will obscure other Tokens on the same Map Layer in the same location.
Usage
<source lang="mtmacro" line> bringToFront() bringToFront(id) bringToFront(id, mapname) </syntaxhighlight> Parameter
id
- The tokenid
or name of the token to effect, defaults to the Current Token.Note: This parameter can only be used in a Trusted Macro.
mapname
- The name of the map to find the token. Defaults to the current map.
Examples
<source lang="mtmacro" line>
[h: bringToFront()] </syntaxhighlight>
<source lang="mtmacro" line>
[h: bringToFront("Hero")]
See Also
Version Changes
- 1.3b51 - Added
id
parameter option. - 1.5.4 - Added
mapname
parameter option.