Description
Create custom commanding menu (with multiple pages if necessary).
Syntax
[namePath, variable, itemDetails, subMenu, codeStr, parameters, showKey] call BIS_fnc_createMenu
Parameters:
namePath: String or Array - can be one of:variable: String - variable in which will be menu params stored (as*variable*_0,*variable*_1etc)itemDetails: Array - menu items, format can be one of:- [items]
- [[items], [itemNames], [itemEnable]] if custom parameters are to be set (names, enable values)
subMenu: String - name of the submenu which will open when item is activated. Name of the selected item is passed to string as%1codeStr: String - expression which is executed when item is activated; item's name is passed to string as%1, ID as%2, parameters (below) as%3parameters: Anything - (Optional) passed to codeStr as%3showKey: Boolean - (Optional, default true) false to hide number shortcuts
Returns: Boolean - always true
Examples
Example 1
["Menu", "b", ["first", "second"], "","hint 'ahoj'"] call BIS_fnc_createMenu;
showCommandingMenu "#USER:b_0";
Example 2
private _itemDetails = [["firstData", "secondData"], ["First", "Second"]];
["Menu", "b", _itemDetails, "", "hint (str '%1' + str '%2' + str '%3')"] call BIS_fnc_createMenu;
showCommandingMenu "#USER:b_0";