createDisplay: Difference between revisions
Jump to navigation
Jump to search
Killzone Kid (talk | contribs) mNo edit summary |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 15: | Line 15: | ||
|p1= parent: [[Display]] |= Parameter 1 | |p1= parent: [[Display]] |= Parameter 1 | ||
|p2= resourceName: [[String]] |= Parameter 2 | |p2= resourceName: [[String]] - custom display class defined in [[description.ext]] or existing display class from main config |= Parameter 2 | ||
| [[Nothing]] or (''Since Arma 3 v1.49.131653'') [[Display]] |= Return value | | [[Nothing]] or (''Since Arma 3 v1.49.131653'') [[Display]] |= Return value |
Revision as of 20:04, 3 January 2017
Description
- Description:
- Create child display of given display and load from "resourceName". The notable difference between createDisplay and createDialog is that if child display class has movingEnable = 1; param, the player would be able to move whilst having control of the mouse pointer.
Since Arma 3 v1.49.131653 createDisplay returns Display and will first look in description.ext for resourceName config, if not found, it will then look in main config. - Groups:
- Uncategorised
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:
- Nothing or (Since Arma 3 v1.49.131653) Display
Examples
- Example 1:
findDisplay 46 createDisplay "RscCredits";
- Example 2:
- Create empty display (with movingEnable = 0):
_emptyDisplay = findDisplay 46 createDisplay "RscDisplayEmpty";
Additional Information
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
Notes
Bottom Section
- 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
-
Arma3 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.
EXAMPLE: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.