createDialog: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Some wiki formatting)
 
(57 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| ofp |= Game name
|game1= ofp
|version1= 1.75


|1.5|= Game version
|game2= ofpe
|version2= 1.00


|eff= local |= Effects in MP
|game3= arma1
____________________________________________________________________________________________
|version3= 1.00


| 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/bin|resource.cpp]]. The given name has to be the class name used in one of these files. If another dialog is already opened, the desired dialog is created as a child dialog of the one already opened. |= Description
|game4= arma2
____________________________________________________________________________________________
|version4= 1.00


| '''createDialog''' dialogName |= Syntax
|game5= arma2oa
|version5= 1.50


|p1= dialogName: [[String]] - class name used in the description.ext / resource.cpp |= Parameter 1
|game6= tkoh
|version6= 1.00


| [[Boolean]] - 
|game7= arma3
true when the dialog was created successfully |= Return value
|version7= 0.50
____________________________________________________________________________________________
 
|x1= <code>_ok = [[createDialog]] "RscDisplayGame";
[[if]] (!_ok) [[then]] {[[hint]] "Dialog couldn't be opened!"};</code> |= Example 1
____________________________________________________________________________________________


| [[displayCtrl]], [[createDisplay]], [[closeDialog]], [[dialog]], [[displayNull]], [[controlNull]], [[createDisplay]], [[ctrlCreate]], [[displayParent]] |= See also
|eff= local


}}
|gr1= GUI Control
 
|descr= Creates a dialog which is defined either in the mission's [[Description.ext|description.ext]], in the campaign's description.ext or in the global [[Resource.cpp/bin|resource.cpp]]. The given name has to be the class name used in one of these files. If another dialog is already opened, the desired dialog is created as a child dialog of the one already opened.
 
{{Feature|informative|By default, displays created with [[createDisplay]] are rendered on top of dialogs created with [[createDialog]]. If ''forceOnTop'' is set to [[true]], the dialog will be rendered on top of displays.}}
 
|s1= [[createDialog]]  dialogName
 
|p1= dialogName: [[String]] - class name used in the description.ext, resource.cpp or config.cpp
 
|r1= [[Boolean]] -  [[true]] when the dialog was created successfully
 
|s2= [[createDialog]] [dialogName, forceOnTop]
 
|s2since= arma3 2.08


<h3 style="display:none">Notes</h3>
|p21= dialogName: [[String]] - class name used in the description.ext, resource.cpp or config.cpp
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|p22= forceOnTop: [[Boolean]] - (Optional, default [[false]]) if [[true]], dialog will be rendered on top of displays
</dl>


<h3 style="display:none">Bottom Section</h3>
|r2= [[Display]] - created dialog


[[Category:Scripting Commands|CREATEDIALOG]]
|x1= <sqf>
[[Category:Scripting Commands OFP 1.99|CREATEDIALOG]]
private _ok = createDialog "RscDisplayGame";
[[Category:Scripting Commands OFP 1.96|CREATEDIALOG]]
if (!_ok) then { hint "Dialog could not be opened!" };
[[Category:Scripting Commands ArmA|CREATEDIALOG]]
</sqf>
[[Category:Command_Group:_GUI_Control|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Interaction|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
|seealso= [[displayCtrl]] [[createDisplay]] [[closeDialog]] [[dialog]] [[displayNull]] [[controlNull]] [[ctrlCreate]] [[displayParent]]
<dl class="command_description">
}}
<dd class="notedate">Posted on July 29, 2017 - 09:04 (UTC)</dd>
 
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
{{Note
<dd class="note">A user dialog created with [[createDisplay]] over mission display ([[findDisplay]] 46) will stop [[displayAddEventHandler|display event handlers]] added to mission display from firing. However if it is created with [[createDialog]] then the event handlers continue to work.
|user= Killzone_Kid
</dd>
|timestamp= 20170729090400
</dl>
|text= A user dialog created with [[createDisplay]] over mission display ([[findDisplay]] 46) will stop [[displayAddEventHandler|display event handlers]] added to mission display from firing. However if it is created with [[createDialog]] then the event handlers continue to work.
<!-- DISCONTINUE Notes -->
}}

Latest revision as of 02:02, 19 March 2023

Hover & click on the images for description

Description

Description:
Creates 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 another dialog is already opened, the desired dialog is created as a child dialog of the one already opened.
By default, displays created with createDisplay are rendered on top of dialogs created with createDialog. If forceOnTop is set to true, the dialog will be rendered on top of displays.
Groups:
GUI Control

Syntax

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

Alternative Syntax

Syntax:
createDialog [dialogName, forceOnTop]
Parameters:
dialogName: String - class name used in the description.ext, resource.cpp or config.cpp
forceOnTop: Boolean - (Optional, default false) if true, dialog will be rendered on top of displays
Return Value:
Display - created dialog

Examples

Example 1:
private _ok = createDialog "RscDisplayGame"; if (!_ok) then { hint "Dialog could not be opened!" };

Additional Information

See also:
displayCtrl createDisplay closeDialog dialog displayNull controlNull ctrlCreate displayParent

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
Killzone_Kid - c
Posted on Jul 29, 2017 - 09:04 (UTC)
A user dialog created with createDisplay over mission display (findDisplay 46) will stop display event handlers added to mission display from firing. However if it is created with createDialog then the event handlers continue to work.