{"name":"createDialog","title":"createDialog","type":"command","url":"https://community.bistudio.com/wiki/createDialog","revid":338553,"updated":"2023-03-19T00:02:56Z","groups":["GUI Control"],"status":"ok","games":{"ofp":"1.75","ofpe":"1.00","arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"ofp 1.75","arma3_since":"0.50","locality":{"effect":"local"},"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.\n\n> [!NOTE]\n> 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.","syntaxes":[{"syntax":"createDialog dialogName","params":[{"name":"dialogName","type":"String","description":"class name used in the description.ext, resource.cpp or config.cpp","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true when the dialog was created successfully"},"form":"unary","right":{"text":"dialogName"}},{"syntax":"createDialog [dialogName, forceOnTop]","since":"arma3 2.08","params":[{"name":"dialogName","type":"String","description":"class name used in the description.ext, resource.cpp or config.cpp","type_expr":"String"},{"name":"forceOnTop","type":"Boolean","optional":true,"default":"false","description":"if true, dialog will be rendered on top of displays","type_expr":"Boolean","text":"forceOnTop: Boolean - (Optional, default false) if true, dialog will be rendered on top of displays"}],"returns":{"type":"Display","type_expr":"Display","description":"created dialog"},"form":"unary","right":{"text":"[dialogName, forceOnTop]"}}],"examples":[{"code":["private _ok = createDialog \"RscDisplayGame\";\nif (!_ok) then { hint \"Dialog could not be opened!\" };"]}],"see_also":["displayCtrl","createDisplay","closeDialog","dialog","displayNull","controlNull","ctrlCreate","displayParent"],"notes":[{"user":"Killzone_Kid","date":"2017-07-29T09:04:00Z","text":"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."}]}