# Module `Menu`

Encapsulation of DCS World Menu system in a set of MENU classes.

## Global(s)

COMMANDMENU |
MENU |
MENU_CLIENT |
MENU_CLIENT_COMMAND |
SUBMENU |

## Type `COMMANDMENU`

COMMANDMENU.ClassName |
COMMANDMENU.CommandMenuArgument |
COMMANDMENU.CommandMenuFunction |
COMMANDMENU:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument) |

## Type `MENU`

MENU.ClassName |
MENU.MenuParentPath |
MENU.MenuPath |
MENU.MenuText |
MENU:New(MenuText, MenuParentPath) |

## Type `MENU_CLIENT`

MENU_CLIENT.ClassName |
MENU_CLIENT:New(MenuClient, MenuText, ParentMenu) | Creates a new menu item for a group
MENU_CLIENT:Remove() | Removes the sub menus recursively of this MENU_CLIENT.
MENU_CLIENT:RemoveSubMenus() | Removes the sub menus recursively of this MENU_CLIENT.

## Type `MENU_CLIENT_COMMAND`

MENU_CLIENT_COMMAND.ClassName |
MENU_CLIENT_COMMAND:New(MenuClient, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument) | Creates a new radio command item for a group
MENU_CLIENT_COMMAND:Remove() |

## Type `SUBMENU`

SUBMENU.ClassName |
SUBMENU:New(MenuText, ParentMenu) |

## Global(s)

#COMMANDMENU COMMANDMENU

#MENU MENU

#MENU_CLIENT MENU_CLIENT

#MENU_CLIENT_COMMAND MENU_CLIENT_COMMAND

#SUBMENU SUBMENU

## Type `Menu`

## Type `COMMANDMENU`

The COMMANDMENU class

### Field(s)

#string COMMANDMENU.ClassName

COMMANDMENU.CommandMenuArgument

COMMANDMENU.CommandMenuFunction

COMMANDMENU:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)

  ### Parameters

  - `MenuText` :

  - `ParentMenu` :

  - `CommandMenuFunction` :

  - `CommandMenuArgument` :

## Type `MENU`

The MENU class

### Field(s)

#string MENU.ClassName

MENU.MenuParentPath

MENU.MenuPath

#string MENU.MenuText

MENU:New(MenuText, MenuParentPath)

  ### Parameters

  - `MenuText` :

  - `MenuParentPath` :

## Type `MENU_CLIENT`

The MENU_CLIENT class

### Field(s)

#string MENU_CLIENT.ClassName

MENU_CLIENT:New(MenuClient, MenuText, ParentMenu)

  Creates a new menu item for a group

  ### Parameters

  - `Client#CLIENT MenuClient` : The Client owning the menu.

  - `#string MenuText` : The text for the menu.

  - `#table ParentMenu` : The parent menu.

  ### Return value

  #MENU_CLIENT: self

MENU_CLIENT:Remove()

  Removes the sub menus recursively of this MENU_CLIENT.

  ### Return value

  #MENU_CLIENT: self

MENU_CLIENT:RemoveSubMenus()

  Removes the sub menus recursively of this MENU_CLIENT.

  ### Return value

  #MENU_CLIENT: self

## Type `MENU_CLIENT_COMMAND`

The MENUCLIENTCOMMAND class

### Field(s)

#string MENU_CLIENT_COMMAND.ClassName

MENU_CLIENT_COMMAND:New(MenuClient, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument)

  Creates a new radio command item for a group

  ### Parameters

  - `Client#CLIENT MenuClient` : The Client owning the menu.

  - `MenuText` : The text for the menu.

  - `ParentMenu` : The parent menu.

  - `CommandMenuFunction` : A function that is called when the menu key is pressed.

  - `CommandMenuArgument` : An argument for the function.

  ### Return value

  Menu#MENUCLIENTCOMMAND: self

MENU_CLIENT_COMMAND:Remove()

## Type `SUBMENU`

The SUBMENU class

### Field(s)

#string SUBMENU.ClassName

SUBMENU:New(MenuText, ParentMenu)

  ### Parameters

  - `MenuText` :

  - `ParentMenu` :