createDisplay: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<dl class="command_description"> <dd class="notedate">" to "<dl class="command_description"> <dt></dt> <dd class="notedate">")
m (Text replacement - " <dd class="notedate">" to " <dt><dt> <dd class="notedate">")
Line 44: Line 44:
<code>[] [[spawn]] {[[findDisplay]] 46 [[createDisplay]] "RscCredits"};</code>
<code>[] [[spawn]] {[[findDisplay]] 46 [[createDisplay]] "RscCredits"};</code>
</dd>
</dd>
 
<dt><dt>
<dd class="notedate">Posted on November 15, 2014 - 13:20 (UTC)</dd>
<dd class="notedate">Posted on November 15, 2014 - 13:20 (UTC)</dd>
<dt class="note">[[User:MrPineapple|MrPineapple]]</dt>
<dt class="note">[[User:MrPineapple|MrPineapple]]</dt>
Line 55: Line 55:


</dd>
</dd>
 
<dt><dt>
<dd class="notedate">Posted on July 29, 2017 - 09:02 (UTC)</dd>
<dd class="notedate">Posted on July 29, 2017 - 09:02 (UTC)</dd>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
<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.
<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.
</dd>
</dd>
 
<dt><dt>
<dd class="notedate">Posted on June 21, 2020 - 17:01 (UTC)</dd>
<dd class="notedate">Posted on June 21, 2020 - 17:01 (UTC)</dd>
<dt class="note">[[User:Target_practice|Target_practice]]</dt>
<dt class="note">[[User:Target_practice|Target_practice]]</dt>

Revision as of 00:11, 6 April 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
GUI Control

Syntax

Syntax:
Syntax needed
Parameters:
parent: Display
resourceName: String - custom display class defined in description.ext or existing display class from main config
Return Value:
Return value needed

Examples

Example 1:
findDisplay 46 createDisplay "RscCredits";
Example 2:
// creates an empty display private _emptyDisplay = findDisplay 46 createDisplay "RscDisplayEmpty";

Additional Information

See also:
closeDisplaycreateDialogdisplayCtrldialogdisplayNullcontrolNullctrlCreatedisplayParent

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 August 23, 2014 - 23:36 (UTC)
Killzone Kid
Do not simply createDisplay from UI context code such as "ButtonDown" UI Event handler, as it will crash the game. Instead use spawn scope: [] spawn {findDisplay 46 createDisplay "RscCredits"};
Posted on November 15, 2014 - 13:20 (UTC)
MrPineapple
Arma 3 v1.34
When using createDisplay instead of createDialog, all the commands for working with the controls of the display only work with the control version, not the IDC version: LbAdd [1234, "item"]; // does not work on displays, and won't error either _ctrl LbAdd "item"; // does work with displays So you have to use the control(DisplayCtrl) and not the IDC.
Posted on July 29, 2017 - 09:02 (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.
Posted on June 21, 2020 - 17:01 (UTC)
Target_practice
Creating a display with the same parent as an existing display will destroy the latter and all of its children. However, their onUnload, onChildDestroyed, and onDestroy event handlers will not fire.