bringToFront: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
No edit summary
Line 1: Line 1:
{{stub}}
{{MacroFunction
{{MacroFunction
|name=bringToFront
|name=bringToFront
|version=1.3b48
|version=1.3b48
|description=Moves the [[Token:Current Token|Current Token]] in front of all of the other [[Token:token|token]]s on the same [[Map:map layer|map layer]].
|description=Adjust the z order (or draw order) of the [[Token:token|token]] so that is is drawn after all other [[Token:token|token]]s on the
same [[Map:map layer|map layer]], this has the effect of making the [[Token:token|token]] appear to be in front of the other
[[Token:token|token]]s as it will obscure other [[Token:token|token]]s on the same [[Map:map layer|map layer]] in the same location.


|usage=
|usage=
Line 9: Line 10:
bringToFront()
bringToFront()
</source>
</source>
<source lang="mtmacro" line>
bringToFront(id)
</source>
'''Parameter'''
{{param|id|The id or name of the token to effect. Can only be used when running from a [[Trusted Macro]].}}
|example=
<source lang="mtmacro" line>
<!-- Make sure that we are visible above all other tokens on the same layer -->
[h: bringToFront()]
</source>
<source lang="mtmacro" line>
<!-- The Hero of the piece should always stand out -->
[h: bringToFront("Hero")]
</source>
|changes=
{{change|1.3b51|Added {{code|id}} optional id parameter.}}
}}
}}
[[Category:Token Function]]
[[Category:Token Function]]

Revision as of 05:57, 27 March 2009

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

bringToFront()
bringToFront(id)

Parameter

  • id - The id or name of the token to effect. Can only be used when running from a Trusted Macro.

Example

<!-- Make sure that we are visible above all other tokens on the same layer -->
[h: bringToFront()]


<!-- The Hero of the piece should always stand out -->
[h: bringToFront("Hero")]


Version Changes

  • 1.3b51 - Added id optional id parameter.