getOverlayProperties: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Text replacement - "source>" to "syntaxhighlight>")
m (Text replacement - "<source" to "<syntaxhighlight")
 
Line 7: Line 7:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
getOverlayProperties(name)
getOverlayProperties(name)
</syntaxhighlight>
</syntaxhighlight>
Line 16: Line 16:
|example=
|example=
Opening up an overlay
Opening up an overlay
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[overlay("Test Overlay", "zorder=100;"): {test}]
[overlay("Test Overlay", "zorder=100;"): {test}]
</syntaxhighlight>
</syntaxhighlight>
Line 22: Line 22:
Getting the properties of the overlay:
Getting the properties of the overlay:


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


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

Latest revision as of 21:01, 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

getOverlayProperties(name)

Parameters

  • name - The name of the overlay.

Example

Opening up an overlay
[overlay("Test Overlay", "zorder=100;"): {test}]

Getting the properties of the overlay:

[getOverlayProperties("Test Overlay")]

The output will be:

 {"name":"Test Overlay","zorder":100,"visible":1}