createDialog: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\|seealso= *\[\[([^ ]+)\]\], \[\[([^ ]+)\]\]" to "|seealso= $1 $2")
m (Text replacement - "\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "$1$2</code>")
Line 45: Line 45:


|x1= <code>_ok = [[createDialog]] "RscDisplayGame";
|x1= <code>_ok = [[createDialog]] "RscDisplayGame";
[[if]] (!_ok) [[then]] {[[hint]] "Dialog couldn't be opened!"};</code>
if (!_ok) [[then]] {[[hint]] "Dialog couldn't be opened!"};</code>


|seealso= [[displayCtrl]] [[createDisplay]] [[closeDialog]] [[dialog]] [[displayNull]] [[controlNull]] [[ctrlCreate]] [[displayParent]]
|seealso= [[displayCtrl]] [[createDisplay]] [[closeDialog]] [[dialog]] [[displayNull]] [[controlNull]] [[ctrlCreate]] [[displayParent]]

Revision as of 11:32, 12 May 2022

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 - If true, dialog will be rendered on top of displays. Default: false
Return Value:
Display - created dialog

Examples

Example 1:
_ok = createDialog "RscDisplayGame"; if (!_ok) then {hint "Dialog couldn't 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
Posted on July 29, 2017 - 09:04 (UTC)
Killzone Kid
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.