getOverlayProperties: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page GetOverlayProperties to getOverlayProperties: Converting page titles to lowercase)
m (Text replacement - "source>" to "syntaxhighlight>")
Line 9: Line 9:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
getOverlayProperties(name)
getOverlayProperties(name)
</source>
</syntaxhighlight>


'''Parameters'''
'''Parameters'''
Line 18: Line 18:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[overlay("Test Overlay", "zorder=100;"): {test}]
[overlay("Test Overlay", "zorder=100;"): {test}]
</source>
</syntaxhighlight>


Getting the properties of the overlay:
Getting the properties of the overlay:
Line 24: Line 24:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[getOverlayProperties("Test Overlay")]
[getOverlayProperties("Test Overlay")]
</source>
</syntaxhighlight>


The output will be:
The output will be:
<source lang="mtmacro" line>
<source lang="mtmacro" line>
  {"name":"Test Overlay","zorder":100,"visible":1}
  {"name":"Test Overlay","zorder":100,"visible":1}
</source>
</syntaxhighlight>


}}
}}
[[Category:Overlay Function]]
[[Category:Overlay Function]]

Revision as of 19:47, 14 March 2023

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

getOverlayProperties() Function

Introduced in version 1.7.0
Returns a json object holding the properties associated with a given overlay. The properties are name, zorder, and visible.

Usage

<source lang="mtmacro" line> getOverlayProperties(name) </syntaxhighlight>

Parameters

  • name - The name of the overlay.

Example

Opening up an overlay

<source lang="mtmacro" line> [overlay("Test Overlay", "zorder=100;"): {test}] </syntaxhighlight>

Getting the properties of the overlay:

<source lang="mtmacro" line> [getOverlayProperties("Test Overlay")] </syntaxhighlight>

The output will be: <source lang="mtmacro" line>

{"name":"Test Overlay","zorder":100,"visible":1}
</syntaxhighlight>