createDisplay: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^ ]*)\[\[([a-zA-Z0-9_]+)\]\]([^ ]*)<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(9 intermediate revisions by the same user not shown) | |||
Line 29: | Line 29: | ||
|p2= resourceName: [[String]] - custom display class defined in [[Description.ext|description.ext]] or existing display class from main config | |p2= resourceName: [[String]] - custom display class defined in [[Description.ext|description.ext]] or existing display class from main config | ||
|r1= [[Display]] (since {{GVI|arma3|1.50|size=0.75}}, [[Nothing]] before) | |r1= [[Display]] (since {{GVI|arma3|1.50|size= 0.75}}, [[Nothing]] before) | ||
|x1= < | |x1= <sqf>findDisplay 46 createDisplay "RscCredits";</sqf> | ||
|x2= < | |x2= <sqf> | ||
// creates an empty display | |||
private _emptyDisplay = findDisplay 46 createDisplay "RscDisplayEmpty"; | |||
</sqf> | |||
|seealso= [[closeDisplay]] [[createDialog]] [[displayCtrl]] [[dialog]] [[displayNull]] [[controlNull]] [[ctrlCreate]] [[displayParent]] | |seealso= [[closeDisplay]] [[createDialog]] [[displayCtrl]] [[dialog]] [[displayNull]] [[controlNull]] [[ctrlCreate]] [[displayParent]] | ||
Line 43: | Line 45: | ||
|timestamp= 20141115132000 | |timestamp= 20141115132000 | ||
|text= 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: | |text= 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: | ||
< | <sqf> | ||
_ctrl | lbAdd [1234, "item"]; // does not work on displays, and won't error either | ||
_ctrl lbAdd "item"; // does work with displays | |||
</sqf> | |||
So you have to use the control(DisplayCtrl) and not the IDC. | So you have to use the control(DisplayCtrl) and not the IDC. | ||
|game= arma3 | |game= arma3 |
Latest revision as of 19:42, 3 September 2024
Description
- Description:
- Creates child display of given display and loads from "resourceName". The notable difference between createDisplay and createDialog is that with createDisplay the player would be able to move around while the display is shown.
Displays created with createDisplay or createDialog will take control of the mouse pointer and will close when user presses Esc. - Groups:
- GUI Control
Syntax
- Syntax:
- parent createDisplay resourceName
- Parameters:
- parent: Display
- resourceName: String - custom display class defined in description.ext or existing display class from main config
- Return Value:
- Display (since 1.50, Nothing before)
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- closeDisplay createDialog displayCtrl 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 Nov 15, 2014 - 13:20 (UTC)
-
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:
So you have to use the control(DisplayCtrl) and not the IDC.
- Posted on Jun 29, 2017 - 09:02 (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.
- Posted on Jun 21, 2020 - 17:01 (UTC)
- 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.
- Posted on Feb 05, 2022 - 15:47 (UTC)
- When trying to create a display with createDisplay on a non existing display the command will fail silently and return displayNull.
Categories:
- Scripting Commands
- Introduced with Armed Assault version 1.00
- ArmA: Armed Assault: New Scripting Commands
- ArmA: Armed Assault: Scripting Commands
- Arma 2: Scripting Commands
- Arma 2: Operation Arrowhead: Scripting Commands
- Take On Helicopters: Scripting Commands
- Arma 3: Scripting Commands
- Command Group: GUI Control