createDialog: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|CREATEDIALOG]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|CREATEDIALOG]]
____________________________________________________________________________________________
[[Category:Scripting Commands ArmA|CREATEDIALOG]]


| ofpr |= Game name


<h2 style="color:#000066"> '''createDialog ''name'''''</h2>
|1.5|= Game version


|eff= local |= Effects in MP
____________________________________________________________________________________________


'''Operand types:'''
| Create a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files. If already another dialog is opened, the desired dialog is created as child dialog of the already opened one. |= Description
____________________________________________________________________________________________


'''name:''' [[String]]
| '''createDialog''' className |= Syntax


'''Type of returned value:'''
|p1= className: [[String]] - class name used in the description.ext / resource.cpp |= Parameter 1


[[Boolean]]
| [[Boolean]]
true when the dialog was created successfully |= Return value
____________________________________________________________________________________________
 
|x1= <pre>_ok = createDialog "RscDisplayGame"
?!(_ok) : hint "Dialog couldn't be opened!"</pre> |= Example 1
____________________________________________________________________________________________


'''Compatibility:'''
| [[closeDialog]], [[dialog]] |= See also


Added in version '''1.50'''
}}


'''Description:'''
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


Create user [[dialog]] from resource template '''name'''.<br>
<!-- Note Section END -->
If user [[dialog]] already exists, creates child [[dialog]] of topmost user [[dialog]].<br>
</dl>
Class '''name''' is searched for in [[Description.ext|description.ext]] of mission, [[Description.ext|description.ext]] of campaign and global [[Resource.bin|resource.bin]].<br>
Returns success.


<h3 style="display:none">Bottom Section</h3>


'''Example:'''
[[Category:Scripting Commands|CREATEDIALOG]]
_ok = '''createDialog''' "RscDisplayGame"
[[Category:Scripting Commands OFP 1.96|CREATEDIALOG]]
[[Category:Scripting Commands ArmA|CREATEDIALOG]]

Revision as of 00:06, 2 August 2006

Hover & click on the images for description

Description

Description:
Create a dialog which is defined either in the mission's description.ext, in the campaign's description.ext or in the global resource.cpp. The given name has to be the class name used in one of these files. If already another dialog is opened, the desired dialog is created as child dialog of the already opened one.
Groups:
Uncategorised

Syntax

Syntax:
createDialog className
Parameters:
className: String - class name used in the description.ext / resource.cpp
Return Value:
Boolean - true when the dialog was created successfully

Examples

Example 1:
_ok = createDialog "RscDisplayGame"
?!(_ok) : hint "Dialog couldn't be opened!"

Additional Information

See also:
closeDialogdialog

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section