menuEnable: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Some wiki formatting)
m (Some wiki formatting)
 
(One intermediate revision by the same user not shown)
Line 7: Line 7:


|descr= Enables or disables menu entry on given path.
|descr= Enables or disables menu entry on given path.
{{Feature|important|The old alternative syntax {{hl|control [[menuEnable]] path}} is still in use and left for backward compatibility.}}


|s1= [[menuEnable]] [idc, path, enable]
|s1= [[menuEnable]] [idc, path, enable]
Line 32: Line 30:
|r2= [[Nothing]]
|r2= [[Nothing]]


|x1= <sqf>findDisplay 313 displayCtrl 120 menuEnable [0];</sqf>
|s3= control [[menuEnable]] path {{Feature|obsolete|This old syntax is kept only for backward compatibility.|arma3|2.06}}
 
|p41= control: [[Control]]
 
|p42= path: [[Array]]
 
|r3= [[Nothing]]
 
|x1= <sqf>findDisplay 313 displayCtrl 120 menuEnable [0]; // old syntax, do not use</sqf>


|x2= <sqf>findDisplay 313 displayCtrl 120 menuEnable [[0, 0, 1], false]; // Since Arma 3 v2.06</sqf>
|x2= <sqf>findDisplay 313 displayCtrl 120 menuEnable [[0, 0, 1], false]; // since {{arma3}} v2.06</sqf>


|seealso= [[menuEnabled]]
|seealso= [[menuEnabled]]
}}
}}

Latest revision as of 20:39, 3 May 2024

Hover & click on the images for description

Description

Description:
Enables or disables menu entry on given path.
Groups:
GUI Control - Menu

Syntax 1

Syntax:
menuEnable [idc, path, enable]
Parameters:
idc: Number
path: Array
since Arma 3 logo black.png2.06
enable: Boolean - (Optional, default true) disabled if false
Return Value:
Nothing

Syntax 2

Syntax:
control menuEnable [path, enable]
Parameters:
control: Control
path: Array
since Arma 3 logo black.png2.06
enable: Boolean - (Optional, default true) disabled if false
Return Value:
Nothing

Syntax 3

Syntax:
control menuEnable path
🕖
This information is obsolete as of Arma 3 v2.06. Reason: This old syntax is kept only for backward compatibility.
Parameters:
control: Control
path: Array
Return Value:
Nothing

Examples

Example 1:
findDisplay 313 displayCtrl 120 menuEnable [0]; // old syntax, do not use
Example 2:
findDisplay 313 displayCtrl 120 menuEnable [[0, 0, 1], false]; // since Arma 3 v2.06

Additional Information

See also:
menuEnabled

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