BIS fnc initDisplay: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - " +\[ +" to " [")
 
(33 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|= Game version
|gr1= GUI


|gr1 = GUI |GROUP1=
|descr= This function is a central part of how BI handles UIs. For a full explanation see [[GUI_Tutorial#BIS_fnc_initDisplay|this page]].
____________________________________________________________________________________________


| Initialize displays during preStart or init GUI display and run its script.<br>
|s1= parameters call [[BIS_fnc_initDisplay]]
The config class of the display is available in "BIS_fnc_initDisplay_configClass" stored on display:
<code>_display [[getVariable]] "BIS_fnc_initDisplay_configClass";</code>
 
Display is also stored in uiNamespace variable with config class name:
<code>[[uiNamespace]] [[getVariable]] "RscAvCamera";</code> |DESCRIPTION=
____________________________________________________________________________________________
 
| parameters call [[BIS_fnc_initDisplay]] |SYNTAX=


|p1= parameters: [[Array]]
|p1= parameters: [[Array]]
* [&nbsp;] (empty array) - init displays during preStart
* [] - Init displays during preStart
* [mode, params, displayClass, scriptPath]
* [mode, params, displayClass, scriptPath, register]
** mode: [[String]] -  mode, can be "onLoad" or "onUnload"
** mode: [[String]] -  Mode, can be "onLoad" or "onUnload"
** params: [[Array]] - params passed from [[User_Interface_Event_Handlers#onLoad|onLoad]] or [[User_Interface_Event_Handlers#onUnload|onUnload]] UI event handler
** params: [[Array]] - Parameters passed from [[User_Interface_Event_Handlers#onLoad|onLoad]] or [[User_Interface_Event_Handlers#onUnload|onUnload]] UI event handler
** displayClass: [[String]] - [[Display]] class, usually to format "RscDisplayXXX"
** displayClass: [[String]] - [[Display]] class, usually to format "RscDisplayXXX"
** scriptPath: [[String]] - script path from CfgScriptPaths
** scriptPath: [[String]] - Script path from CfgScriptPaths
&nbsp; |PARAMETER1=
** register: [[Number]] or [[Boolean]] - Save variables associated with the display to the uiNamespace. Usually this is {{hl|false}} when the function is called from a control.
&nbsp;
 
|r1= Nothing


| Nothing |RETURNVALUE=
|x1= <sqf>["onLoad", _this, "RscDisplayAAR", "GUI", true] call (uiNamespace getVariable "BIS_fnc_initDisplay");</sqf>
____________________________________________________________________________________________


|x1= <code>["onLoad", [[_this]], "RscDisplayAAR", "GUI"] [[call]] ([[uiNamespace]] [[getVariable]] "[[BIS_fnc_initDisplay]]");</code> |EXAMPLE1=
|seealso= [[GUI Tutorial]] [[Arma: GUI Configuration]]
____________________________________________________________________________________________


| |SEEALSO=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Functions|{{uc:initDisplay}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:initDisplay}}]]

Latest revision as of 18:48, 8 November 2023

Hover & click on the images for description

Description

Description:
This function is a central part of how BI handles UIs. For a full explanation see this page.
Execution:
call
Groups:
GUI

Syntax

Syntax:
parameters call BIS_fnc_initDisplay
Parameters:
parameters: Array
  • [] - Init displays during preStart
  • [mode, params, displayClass, scriptPath, register]
    • mode: String - Mode, can be "onLoad" or "onUnload"
    • params: Array - Parameters passed from onLoad or onUnload UI event handler
    • displayClass: String - Display class, usually to format "RscDisplayXXX"
    • scriptPath: String - Script path from CfgScriptPaths
    • register: Number or Boolean - Save variables associated with the display to the uiNamespace. Usually this is false when the function is called from a control.
 
Return Value:
Nothing

Examples

Example 1:
["onLoad", _this, "RscDisplayAAR", "GUI", true] call (uiNamespace getVariable "BIS_fnc_initDisplay");

Additional Information

See also:
GUI Tutorial Arma: GUI Configuration

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