Banner Image

Module Core.Menu

Core - Manage hierarchical menu structures and commands for players within a mission.


Features:

  • Setup mission sub menus.
  • Setup mission command menus.
  • Setup coalition sub menus.
  • Setup coalition command menus.
  • Setup group sub menus.
  • Setup group command menus.
  • Manage menu creation intelligently, avoid double menu creation.
  • Only create or delete menus when required, and keep existing menus persistent.
  • Update menu structures.
  • Refresh menu structures intelligently, based on a time stamp of updates.
    • Delete obsolete menus.
    • Create new one where required.
    • Don't touch the existing ones.
  • Provide a variable amount of parameters to menus.
  • Update the parameters and the receiving methods, without updating the menu within DCS!
  • Provide a great performance boost in menu management.
  • Provide a great tool to manage menus in your code.

DCS Menus can be managed using the MENU classes. The advantage of using MENU classes is that it hides the complexity of dealing with menu management in more advanced scenarios where you need to set menus and later remove them, and later set them again. You'll find while using use normal DCS scripting functions, that setting and removing menus is not a easy feat if you have complex menu hierarchies defined. Using the MOOSE menu classes, the removal and refreshing of menus are nicely being handled within these classes, and becomes much more easy. On top, MOOSE implements variable parameter passing for command menus.

There are basically two different MENU class types that you need to use:

To manage main menus, the classes begin with MENU_:

To manage command menus, which are menus that allow the player to issue functions, the classes begin with MENU_COMMAND_:


-

Author: FlightControl

Contributions:


Global(s)

Global MENU_BASE

#table MENU_BASE

Global MENU_COALITION

Manages the main menus for DCS.coalition.

#MENU_COALITION MENU_COALITION

Manages the main menus for DCS.coalition.

You can add menus with the MENU_COALITION.New method, which constructs a MENU_COALITION object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION.Remove.

Usage:

 -- This demo creates a menu structure for the planes within the red coalition.
 -- To test, join the planes, then look at the other radio menus (Option F10).
 -- Then switch planes and check if the menu is still there.

 local Plane1 = CLIENT:FindByName( "Plane 1" )
 local Plane2 = CLIENT:FindByName( "Plane 2" )


 -- This would create a menu for the red coalition under the main DCS "Others" menu.
 local MenuCoalitionRed = MENU_COALITION:New( coalition.side.RED, "Manage Menus" )


 local function ShowStatus( StatusText, Coalition )

   MESSAGE:New( Coalition, 15 ):ToRed()
   Plane1:Message( StatusText, 15 )
   Plane2:Message( StatusText, 15 )
 end

 local MenuStatus -- Menu#MENU_COALITION
 local MenuStatusShow -- Menu#MENU_COALITION_COMMAND

 local function RemoveStatusMenu()
   MenuStatus:Remove()
 end

 local function AddStatusMenu()
   
   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
   MenuStatus = MENU_COALITION:New( coalition.side.RED, "Status for Planes" )
   MenuStatusShow = MENU_COALITION_COMMAND:New( coalition.side.RED, "Show Status", MenuStatus, ShowStatus, "Status of planes is ok!", "Message to Red Coalition" )
 end

 local MenuAdd = MENU_COALITION_COMMAND:New( coalition.side.RED, "Add Status Menu", MenuCoalitionRed, AddStatusMenu )
 local MenuRemove = MENU_COALITION_COMMAND:New( coalition.side.RED, "Remove Status Menu", MenuCoalitionRed, RemoveStatusMenu )
 

Global MENU_COALITION_COMMAND

Manages the command menus for coalitions, which allow players to execute functions during mission execution.

#MENU_COALITION_COMMAND MENU_COALITION_COMMAND

Manages the command menus for coalitions, which allow players to execute functions during mission execution.

You can add menus with the MENU_COALITION_COMMAND.New method, which constructs a MENU_COALITION_COMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_COALITION_COMMAND.Remove.

Global MENU_COMMAND_BASE

Defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.

#MENU_COMMAND_BASE MENU_COMMAND_BASE

Defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.

Global MENU_GROUP

Manages the main menus for Wrapper.Groups.

#MENU_GROUP MENU_GROUP

Manages the main menus for Wrapper.Groups.

You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove.

Usage:

 -- This demo creates a menu structure for the two groups of planes.
 -- Each group will receive a different menu structure.
 -- To test, join the planes, then look at the other radio menus (Option F10).
 -- Then switch planes and check if the menu is still there.
 -- And play with the Add and Remove menu options.
 
 -- Note that in multi player, this will only work after the DCS groups bug is solved.

 local function ShowStatus( PlaneGroup, StatusText, Coalition )

   MESSAGE:New( Coalition, 15 ):ToRed()
   PlaneGroup:Message( StatusText, 15 )
 end

 local MenuStatus = {}

 local function RemoveStatusMenu( MenuGroup )
   local MenuGroupName = MenuGroup:GetName()
   MenuStatus[MenuGroupName]:Remove()
 end

 --- @param Wrapper.Group#GROUP MenuGroup
 local function AddStatusMenu( MenuGroup )
   local MenuGroupName = MenuGroup:GetName()
   -- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
   MenuStatus[MenuGroupName] = MENU_GROUP:New( MenuGroup, "Status for Planes" )
   MENU_GROUP_COMMAND:New( MenuGroup, "Show Status", MenuStatus[MenuGroupName], ShowStatus, MenuGroup, "Status of planes is ok!", "Message to Red Coalition" )
 end

 SCHEDULER:New( nil,
   function()
     local PlaneGroup = GROUP:FindByName( "Plane 1" )
     if PlaneGroup and PlaneGroup:IsAlive() then
       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneGroup )
       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneGroup )
     end
   end, {}, 10, 10 )

 SCHEDULER:New( nil,
   function()
     local PlaneGroup = GROUP:FindByName( "Plane 2" )
     if PlaneGroup and PlaneGroup:IsAlive() then
       local MenuManage = MENU_GROUP:New( PlaneGroup, "Manage Menus" )
       MENU_GROUP_COMMAND:New( PlaneGroup, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneGroup )
       MENU_GROUP_COMMAND:New( PlaneGroup, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneGroup )
     end
   end, {}, 10, 10 )

Global MENU_GROUP_COMMAND

The Core.Menu#MENU_GROUP_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.

#MENU_GROUP_COMMAND MENU_GROUP_COMMAND

The Core.Menu#MENU_GROUP_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.

You can add menus with the MENU_GROUP_COMMAND.New method, which constructs a MENU_GROUP_COMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP_COMMAND.Remove.

Global MENU_GROUP_COMMAND_DELAYED

Manages the command menus for coalitions, which allow players to execute functions during mission execution.

#MENU_GROUP_COMMAND_DELAYED MENU_GROUP_COMMAND_DELAYED

Manages the command menus for coalitions, which allow players to execute functions during mission execution.

You can add menus with the MENU_GROUP_COMMAND_DELAYED.New method, which constructs a MENU_GROUP_COMMAND_DELAYED object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP_COMMAND_DELAYED.Remove.

Global MENU_GROUP_DELAYED

The MENU_GROUP_DELAYED class manages the main menus for groups.

#MENU_GROUP_DELAYED MENU_GROUP_DELAYED

The MENU_GROUP_DELAYED class manages the main menus for groups.

You can add menus with the MENU_GROUP.New method, which constructs a MENU_GROUP object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_GROUP.Remove. The creation of the menu item is delayed however, and must be created using the MENU_GROUP.Set method. This method is most of the time called after the "old" menu items have been removed from the sub menu.

Global MENU_INDEX

#table MENU_INDEX

Global MENU_MISSION

#table MENU_MISSION

Global MENU_MISSION_COMMAND

Manages the command menus for a complete mission, which allow players to execute functions during mission execution.

#MENU_MISSION_COMMAND MENU_MISSION_COMMAND

Manages the command menus for a complete mission, which allow players to execute functions during mission execution.

You can add menus with the MENU_MISSION_COMMAND.New method, which constructs a MENU_MISSION_COMMAND object and returns you the object reference. Using this object reference, you can then remove ALL the menus and submenus underlying automatically with MENU_MISSION_COMMAND.Remove.

Type(s)

Fields and Methods inherited from MENU_BASE Description

MENU_BASE.MenuRemoveParent

MENU_BASE.MenuStamp

MENU_BASE.MenuTag

Fields and Methods inherited from MENU_COALITION Description

MENU_COALITION.Menus

MENU_COALITION:New(Coalition, MenuText, ParentMenu)

MENU_COALITION constructor.

MENU_COALITION:Refresh()

Refreshes a radio item for a coalition

MENU_COALITION:Remove(MenuStamp, MenuTag)

Removes the main menu and the sub menus recursively of this MENU_COALITION.

MENU_COALITION:RemoveSubMenus()

Removes the sub menus recursively of this MENU_COALITION.

Fields and Methods inherited from MENU_COALITION_COMMAND Description

MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)

MENU_COALITION constructor.

MENU_COALITION_COMMAND:Refresh()

Refreshes a radio item for a coalition

MENU_COALITION_COMMAND:Remove(MenuStamp, MenuTag)

Removes a radio command item for a coalition

Fields and Methods inherited from MENU_COMMAND_BASE Description

MENU_COALITION_COMMAND.MenuCallHandler()

MENU_COALITION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)

Constructor

MENU_COALITION_COMMAND:SetCommandMenuArguments(CommandMenuArguments)

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

MENU_COALITION_COMMAND:SetCommandMenuFunction(CommandMenuFunction)

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Fields and Methods inherited from MENU_COMMAND_BASE Description

MENU_COMMAND_BASE.MenuCallHandler()

MENU_COMMAND_BASE:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)

Constructor

MENU_COMMAND_BASE:SetCommandMenuArguments(CommandMenuArguments)

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

MENU_COMMAND_BASE:SetCommandMenuFunction(CommandMenuFunction)

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Fields and Methods inherited from MENU_GROUP Description

MENU_GROUP.Group

MENU_GROUP.GroupID

MENU_GROUP.MenuPath

MENU_GROUP.Menus

MENU_GROUP:New(Group, MenuText, ParentMenu)

MENU_GROUP constructor.

MENU_GROUP:Refresh()

Refreshes a new radio item for a group and submenus

MENU_GROUP:RefreshAndOrderByTag()

Refreshes a new radio item for a group and submenus, ordering by (numerical) MenuTag

MENU_GROUP:Remove(MenuStamp, MenuTag)

Removes the main menu and sub menus recursively of this MENU_GROUP.

MENU_GROUP:RemoveSubMenus(MenuStamp, MenuTag)

Removes the sub menus recursively of this MENU_GROUP.

Fields and Methods inherited from MENU_BASE Description

MENU_GROUP.MenuRemoveParent

MENU_GROUP.MenuStamp

MENU_GROUP.MenuTag

Fields and Methods inherited from MENU_GROUP_COMMAND Description

MENU_GROUP_COMMAND.Group

MENU_GROUP_COMMAND.GroupID

MENU_GROUP_COMMAND.MenuPath

MENU_GROUP_COMMAND:New(Group, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)

Creates a new radio command item for a group

MENU_GROUP_COMMAND:Refresh()

Refreshes a radio item for a group

MENU_GROUP_COMMAND:Remove(MenuStamp, MenuTag)

Removes a menu structure for a group.

Fields and Methods inherited from MENU_COMMAND_BASE Description

MENU_GROUP_COMMAND.MenuCallHandler()

MENU_GROUP_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)

Constructor

MENU_GROUP_COMMAND:SetCommandMenuArguments(CommandMenuArguments)

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

MENU_GROUP_COMMAND:SetCommandMenuFunction(CommandMenuFunction)

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Fields and Methods inherited from MENU_COMMAND_BASE Description

MENU_GROUP_COMMAND_DELAYED.MenuCallHandler()

MENU_GROUP_COMMAND_DELAYED:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)

Constructor

MENU_GROUP_COMMAND_DELAYED:SetCommandMenuArguments(CommandMenuArguments)

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

MENU_GROUP_COMMAND_DELAYED:SetCommandMenuFunction(CommandMenuFunction)

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Fields and Methods inherited from MENU_GROUP_DELAYED Description

MENU_GROUP_DELAYED.Group

MENU_GROUP_DELAYED.GroupID

MENU_GROUP_DELAYED.MenuPath

MENU_GROUP_DELAYED.MenuSet

MENU_GROUP_DELAYED.Menus

MENU_GROUP_DELAYED:New(Group, MenuText, ParentMenu)

MENU_GROUP_DELAYED constructor.

MENU_GROUP_DELAYED:Refresh()

Refreshes a new radio item for a group and submenus

MENU_GROUP_DELAYED:Remove(MenuStamp, MenuTag)

Removes the main menu and sub menus recursively of this MENU_GROUP.

MENU_GROUP_DELAYED:RemoveSubMenus(MenuStamp, MenuTag)

Removes the sub menus recursively of this MENU_GROUP_DELAYED.

MENU_GROUP_DELAYED:Set()

Refreshes a new radio item for a group and submenus

Fields and Methods inherited from MENU_BASE Description

MENU_GROUP_DELAYED.MenuRemoveParent

MENU_GROUP_DELAYED.MenuStamp

MENU_GROUP_DELAYED.MenuTag

Fields and Methods inherited from MENU_MISSION Description

MENU_MISSION.MenuPath

MENU_MISSION.Menus

Fields and Methods inherited from MENU_MISSION_COMMAND Description

MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)

MENU_MISSION constructor.

MENU_MISSION_COMMAND:Refresh()

Refreshes a radio item for a mission

MENU_MISSION_COMMAND:Remove()

Removes a radio command item for a coalition

Fields and Methods inherited from MENU_COMMAND_BASE Description

MENU_MISSION_COMMAND.MenuCallHandler()

MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)

Constructor

MENU_MISSION_COMMAND:SetCommandMenuArguments(CommandMenuArguments)

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

MENU_MISSION_COMMAND:SetCommandMenuFunction(CommandMenuFunction)

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Field(s)

MENU_BASE.MenuRemoveParent

self:F( { RemoveParent } )

Function(s)

Field(s)

Function(s)

MENU_COALITION constructor.

Creates a new MENU_COALITION object and creates the menu for a complete coalition.

Defined in:

MENU_COALITION

Parameters:

DCS#coalition.side Coalition

The coalition owning the menu.

#string MenuText

The text for the menu.

#table ParentMenu

The parent menu. This parameter can be ignored if you want the menu to be located at the parent menu of DCS world (under F10 other).

Return value:

Refreshes a radio item for a coalition

Defined in:

MENU_COALITION

Return value:

Removes the main menu and the sub menus recursively of this MENU_COALITION.

Defined in:

MENU_COALITION

Parameters:

MenuStamp

MenuTag

Return value:

#nil:

Removes the sub menus recursively of this MENU_COALITION.

Note that the main menu is kept!

Defined in:

MENU_COALITION

Return value:

Field(s)

Function(s)

MENU_COALITION constructor.

Creates a new radio command item for a coalition, which can invoke a function with parameters.

Defined in:

MENU_COALITION_COMMAND

Parameters:

DCS#coalition.side Coalition

The coalition owning the menu.

#string MenuText

The text for the menu.

The parent menu.

CommandMenuFunction

A function that is called when the menu key is pressed.

CommandMenuArgument

An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

...

Return value:

Refreshes a radio item for a coalition

Defined in:

MENU_COALITION_COMMAND

Return value:

Removes a radio command item for a coalition

Defined in:

MENU_COALITION_COMMAND

Parameters:

MenuStamp

MenuTag

Return value:

#nil:

Field(s)

Function(s)

Constructor

Defined in:

Parameters:

MenuText

ParentMenu

CommandMenuFunction

CommandMenuArguments

Return value:

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuArguments

Return value:

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuFunction

Return value:

Field(s)

Function(s)

Defined in:

MENU_COMMAND_BASE

Constructor

Defined in:

MENU_COMMAND_BASE

Parameters:

MenuText

ParentMenu

CommandMenuFunction

CommandMenuArguments

Return value:

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

Defined in:

MENU_COMMAND_BASE

Parameter:

CommandMenuArguments

Return value:

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Defined in:

MENU_COMMAND_BASE

Parameter:

CommandMenuFunction

Return value:

Field(s)

Function(s)

MENU_GROUP constructor.

Creates a new radio menu item for a group.

Defined in:

MENU_GROUP

Parameters:

The Group owning the menu.

#string MenuText

The text for the menu.

#table ParentMenu

The parent menu.

Return value:

self

Refreshes a new radio item for a group and submenus

Defined in:

MENU_GROUP

Return value:

Refreshes a new radio item for a group and submenus, ordering by (numerical) MenuTag

Defined in:

MENU_GROUP

Return value:

Removes the main menu and sub menus recursively of this MENU_GROUP.

Defined in:

MENU_GROUP

Parameters:

MenuStamp

MenuTag

A Tag or Key to filter the menus to be refreshed with the Tag set.

Return value:

#nil:

Removes the sub menus recursively of this MENU_GROUP.

Defined in:

MENU_GROUP

Parameters:

MenuStamp

MenuTag

A Tag or Key to filter the menus to be refreshed with the Tag set.

Return value:

self

Field(s)

Function(s)

Field(s)

Function(s)

Creates a new radio command item for a group

Defined in:

MENU_GROUP_COMMAND

Parameters:

The Group 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:

Refreshes a radio item for a group

Defined in:

MENU_GROUP_COMMAND

Return value:

Removes a menu structure for a group.

Defined in:

MENU_GROUP_COMMAND

Parameters:

MenuStamp

MenuTag

A Tag or Key to filter the menus to be refreshed with the Tag set.

Return value:

#nil:

Field(s)

Function(s)

Constructor

Defined in:

Parameters:

MenuText

ParentMenu

CommandMenuFunction

CommandMenuArguments

Return value:

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuArguments

Return value:

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuFunction

Return value:

Field(s)

Function(s)

Creates a new radio command item for a group

Defined in:

MENU_GROUP_COMMAND_DELAYED

Parameters:

The Group 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:

Refreshes a radio item for a group

Defined in:

MENU_GROUP_COMMAND_DELAYED

Return value:

Removes a menu structure for a group.

Defined in:

MENU_GROUP_COMMAND_DELAYED

Parameters:

MenuStamp

MenuTag

A Tag or Key to filter the menus to be refreshed with the Tag set.

Return value:

#nil:

Refreshes a radio item for a group

Defined in:

MENU_GROUP_COMMAND_DELAYED

Return value:

Field(s)

Function(s)

Constructor

Defined in:

Parameters:

MenuText

ParentMenu

CommandMenuFunction

CommandMenuArguments

Return value:

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuArguments

Return value:

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuFunction

Return value:

Field(s)

Function(s)

MENU_GROUP_DELAYED constructor.

Creates a new radio menu item for a group.

Defined in:

MENU_GROUP_DELAYED

Parameters:

The Group owning the menu.

#string MenuText

The text for the menu.

#table ParentMenu

The parent menu.

Return value:

Refreshes a new radio item for a group and submenus

Defined in:

MENU_GROUP_DELAYED

Return value:

Removes the main menu and sub menus recursively of this MENU_GROUP.

Defined in:

MENU_GROUP_DELAYED

Parameters:

MenuStamp

MenuTag

A Tag or Key to filter the menus to be refreshed with the Tag set.

Return value:

#nil:

Removes the sub menus recursively of this MENU_GROUP_DELAYED.

Defined in:

MENU_GROUP_DELAYED

Parameters:

MenuStamp

MenuTag

A Tag or Key to filter the menus to be refreshed with the Tag set.

Return value:

Refreshes a new radio item for a group and submenus

Defined in:

MENU_GROUP_DELAYED

Return value:

Field(s)

Function(s)

Field(s)

Function(s)

Field(s)

Function(s)

MENU_MISSION constructor.

Creates a new radio command item for a complete mission file, which can invoke a function with parameters.

Defined in:

MENU_MISSION_COMMAND

Parameters:

#string MenuText

The text for the menu.

The parent menu.

CommandMenuFunction

A function that is called when the menu key is pressed.

CommandMenuArgument

An argument for the function. There can only be ONE argument given. So multiple arguments must be wrapped into a table. See the below example how to do this.

...

Return value:

Refreshes a radio item for a mission

Defined in:

MENU_MISSION_COMMAND

Return value:

Removes a radio command item for a coalition

Defined in:

MENU_MISSION_COMMAND

Return value:

#nil:

Field(s)

Function(s)

Constructor

Defined in:

Parameters:

MenuText

ParentMenu

CommandMenuFunction

CommandMenuArguments

Return value:

This sets the new command arguments of a menu, so that if a menu is regenerated, or if command arguments change, that the arguments set for the menu are loosely coupled with the menu itself!!! If the arguments change, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuArguments

Return value:

This sets the new command function of a menu, so that if a menu is regenerated, or if command function changes, that the function set for the menu is loosely coupled with the menu itself!!! If the function changes, no new menu needs to be generated if the menu text is the same!!!

Defined in:

Parameter:

CommandMenuFunction

Return value: