BIS fnc initDisplay: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Page creation - missing see also)
 
m (Text replacement - " +\[ +" to " [")
 
(41 intermediate revisions by 4 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
____________________________________________________________________________________________


| Initialize displays during preStart or init GUI display and run its script.<br />
|descr= This function is a central part of how BI handles UIs. For a full explanation see [[GUI_Tutorial#BIS_fnc_initDisplay|this page]].
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:
|s1= parameters call [[BIS_fnc_initDisplay]]
<code>[[uiNamespace]] [[getVariable]] "RscAvCamera";</code> |= Description
____________________________________________________________________________________________


| parameter call [[BIS_fnc_setDate]] |= Syntax
|p1= parameters: [[Array]]
* [] - Init displays during preStart
* [mode, params, displayClass, scriptPath, register]
** mode: [[String]] -  Mode, can be "onLoad" or "onUnload"
** 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"
** scriptPath: [[String]] - Script path from CfgScriptPaths
** 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;


|p1= parameter: [[Array]]
|r1= Nothing
* [&nbsp;] (empty array) - init displays during preStart
* [mode, params, displayClass, scriptPath]
** mode: [[String]] -  mode, can be "onLoad" or "onUnload"
** params: [[Array]] - params passed from "onLoad" or "onUnload" event handler, contains only DISPLAY
** displayClass: [[String]] - [[Display]] class
** scriptPath: [[String]] - script path from CfgScriptPaths
&nbsp; |= Parameter 1


| Nothing |= Return value
|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> |= Example 1
|seealso= [[GUI Tutorial]] [[Arma: GUI Configuration]]
____________________________________________________________________________________________


| |= See also
}}
}}
<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:Function Group: GUI|{{uc:initDisplay}}]]
[[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