getDialogProperties: 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>
getDialogProperties(name)
getDialogProperties(name)
</syntaxhighlight>
</syntaxhighlight>
Line 16: Line 16:
|example=
|example=
Opening up a dialog
Opening up a dialog
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[dialog("Dialog Test", "width=300; height=200; temporary=0; title=A new title; value=data of relevance"): {test}]
[dialog("Dialog Test", "width=300; height=200; temporary=0; title=A new title; value=data of relevance"): {test}]
</syntaxhighlight>
</syntaxhighlight>
Line 22: Line 22:
Getting the properties of the dialog:
Getting the properties of the dialog:


<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[getDialogProperties("Dialog Test")]
[getDialogProperties("Dialog Test")]
</syntaxhighlight>
</syntaxhighlight>


The output will be:
The output will be:
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
  {"width":300,"height":200,"temporary":0,"title":"A new title","value":"data of relevance"}
  {"width":300,"height":200,"temporary":0,"title":"A new title","value":"data of relevance"}
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 19:36, 14 March 2023

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

getDialogProperties() Function

Introduced in version 1.5.4
Returns a json object holding the properties associated with a given dialog. The properties are width, height, temporary, title, and value.

Usage

getDialogProperties(name)

Parameters

  • name - The name of the dialog.

Example

Opening up a dialog
[dialog("Dialog Test", "width=300; height=200; temporary=0; title=A new title; value=data of relevance"): {test}]

Getting the properties of the dialog:

[getDialogProperties("Dialog Test")]

The output will be:

 {"width":300,"height":200,"temporary":0,"title":"A new title","value":"data of relevance"}