Updated to Version 2.

Thought i would share an addAction menu system i wrote.
Your free to do with it what ever you desire, of course a little mention is always welcome. 😄

The actionMenu system provides a usable multi depth menu in the form of addActions. It has a simple structure of addAction parameters in the form of a multidimension array as seen below. menu = [ action, [ //child menu action ] ]; An action is the same as the full parameter list used in an Arma3 addAction command.
[title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition]
See https://community.bistudio.com/wiki/addActionfor further details.
An actions code MUST be in the form of code {} not string.

For instance.. menu = [ [ "Menu 0", {}, [], -1, false, false, "", "" ], [ [ "Option 0", {hint "This is option 0 of sub menu 0"}, [], -1, false, false, "", "" ], [ "Option 1", {hint "This is option 1 of sub menu 0"}, [], -1, false, false, "", "" ] ], [ "Menu 1", {}, [], -1, false, false, "", "" ], [ [ "Option 0", {hint "This is option 0 of sub menu 1"}, [], -1, false, false, "", "" ], [ "Option 1", {hint "This is option 1 of sub menu 1"}, [], -1, false, false, "", "" ], [ "Menu 1-0", {}, [], -1, false, false, "", "" ], [ [ "Option 0", {hint "This is option 0 of sub menu 1-0"}, [], -1, false, false, "", "" ], [ "Option 1", {hint "This is option 1 of sub menu 1-0"}, [], -1, false, false, "", "" ] ] ] ]; [ menu, player, false, 5, [ true, true, true, false ] ] call LARs_fnc_menuStart;  
[ _menu,_vehicle, _shared, _menuDistance, _controls( HIDE, HOME, BACK, REMOVE ) ] call LARs_fnc_menuStart;

_menu - An array of actions to show, child menu actions follow their parent contained in an array - also supports as STRING the name of a global variable containing a menu structure so a _shared menu does not have to be passed over the network
 
_vehicle( optional ) - Object to apply menu to, defaults to player if not provided.
 
_shared( optional ) - Clients to also show menu for - follows BIS_fnc_MP convention ( bool, obj, side, client etc ) - ( default false ) if TRUE will pass to all clients, false does NOT pass to server but is used internally to not share. If _shared then menu is automatically added for JIP.
 
_menuDistance( optional ) - Default distance actions will be visible from, applied to ALL actions, overrides default 15m for non player actions ( default 5m )
 
_controls( optional ) - An array of booleans on whether to show the default menu navigation options ( default [ true, true, true, false ] )
The options being in order.. HIDE - Closes the actionMenu. HOME - Returns menu to root. Only appears when you are deeper than one sub menu. BACK - Returns you to the previous menu. REMOVE - Closes the actionMenu and removes the menu from the vehicle, as such it is turned off by default. To use simple copy the LARs folder from this test mission into yours and copy the CfgFunctions from the description.ext into yours.
If you already have a CfgFunctions just add my #include 'LARs\actionMenu.cpp'.

Further reading..
This info can also be found in LARs\actionMenu\info.txt

Downloaded from : HERE


Any problems or suggestions just post and ill try to help.