setInfoPanel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Arma[ _]3(\|.*)\]\]" to "{{GameCategory|arma3|Scripting Commands}}")
m (Text replacement - "[[Arma 3 " to "[[Arma 3: ")
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.72


|1.72|Game version=
|gr1= Custom Panels


|gr1= Custom Panels |GROUP1=
|descr= Opens given component or first component of given component type on specified info panel.
____________________________________________________________________________________________


| Opens given component or first component of given component type on specified info panel. |DESCRIPTION=
|s1= [[setInfoPanel]] [infoPanelId, componentClassOrType]
____________________________________________________________________________________________


| [[setInfoPanel]] [infopanelId, componentClassOrType]; |SYNTAX=
|p1= infoPanelId: [[String]] - info panel classname, or "left" or "right"


|p1= infoPanelId: [[String]] - info panel classname, or "left" or "right" |PARAMETER1=
|p2= componentClassOrType: [[String]]


|p2= componentClassOrType: [[String]] |PARAMETER2=
|r1= [[Boolean]] - [[true]] if panel was successfully opened, [[false]] otherwise (e.g. opening GPS on player without GPS item or setting panel to vehicle that doesn't have such capability configured)


| [[Boolean]] - [[true]] if panel was successfully opened, [[false]] otherwise (e.g. opening GPS on player without GPS item or setting panel to vehicle that doesn't have such capability configured) |RETURNVALUE=
|x1= <sqf>
____________________________________________________________________________________________
// opens slingload assistant on right panel
private _result = setInfoPanel ["VehicleSystemsDisplayManagerComponentRight", "SlingLoadDisplayComponent"];
if (!_result) then { hint "could not open the slingload assistant, sorry" };
</sqf>


|x1 = <code>{{codecomment|//opens slingload assistant on right panel}}
|seealso= [[Arma 3: Custom Info]] [[infoPanel]] [[infoPanels]] [[infoPanelComponents]] [[enableInfoPanelComponent]] [[infoPanelComponentEnabled]]
_result = [[setInfoPanel]] ["VehicleSystemsDisplayManagerComponentRight", "SlingLoadDisplayComponent"];</code> |EXAMPLE1=
 
| [[Arma 3 Custom Info]], [[infoPanel]], [[infoPanels]], [[infoPanelComponents]], [[enableInfoPanelComponent]], [[infoPanelComponentEnabled]] |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:Scripting Commands|{{uc:{{PAGENAME}}}}]]
{{GameCategory|arma3|Scripting Commands}}

Latest revision as of 10:38, 6 May 2024

Hover & click on the images for description

Description

Description:
Opens given component or first component of given component type on specified info panel.
Groups:
Custom Panels

Syntax

Syntax:
setInfoPanel [infoPanelId, componentClassOrType]
Parameters:
infoPanelId: String - info panel classname, or "left" or "right"
componentClassOrType: String
Return Value:
Boolean - true if panel was successfully opened, false otherwise (e.g. opening GPS on player without GPS item or setting panel to vehicle that doesn't have such capability configured)

Examples

Example 1:
// opens slingload assistant on right panel private _result = setInfoPanel ["VehicleSystemsDisplayManagerComponentRight", "SlingLoadDisplayComponent"]; if (!_result) then { hint "could not open the slingload assistant, sorry" };

Additional Information

See also:
Arma 3: Custom Info infoPanel infoPanels infoPanelComponents enableInfoPanelComponent infoPanelComponentEnabled

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