FlightControl_Master b7183023c9 Documentation
2017-11-22 06:23:58 +01:00

1786 lines
45 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" href="stylesheet.css" type="text/css"/>
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div>
<div id="main">
<div id="navigation">
<h2>Modules</h2>
<ul><li>
<a href="index.html">index</a>
</li></ul>
<ul>
<li><a href="AI_A2A.html">AI_A2A</a></li>
<li><a href="AI_A2A_Cap.html">AI_A2A_Cap</a></li>
<li><a href="AI_A2A_Dispatcher.html">AI_A2A_Dispatcher</a></li>
<li><a href="AI_A2A_GCI.html">AI_A2A_GCI</a></li>
<li><a href="AI_A2A_Patrol.html">AI_A2A_Patrol</a></li>
<li><a href="AI_Bai.html">AI_Bai</a></li>
<li><a href="AI_Balancer.html">AI_Balancer</a></li>
<li><a href="AI_Cap.html">AI_Cap</a></li>
<li><a href="AI_Cas.html">AI_Cas</a></li>
<li><a href="AI_Formation.html">AI_Formation</a></li>
<li><a href="AI_Patrol.html">AI_Patrol</a></li>
<li><a href="ATC_Ground.html">ATC_Ground</a></li>
<li><a href="Account.html">Account</a></li>
<li><a href="Airbase.html">Airbase</a></li>
<li><a href="Assign.html">Assign</a></li>
<li><a href="Base.html">Base</a></li>
<li><a href="Cargo.html">Cargo</a></li>
<li><a href="CleanUp.html">CleanUp</a></li>
<li><a href="Client.html">Client</a></li>
<li><a href="CommandCenter.html">CommandCenter</a></li>
<li><a href="Controllable.html">Controllable</a></li>
<li><a href="DCSAirbase.html">DCSAirbase</a></li>
<li><a href="DCSCoalitionObject.html">DCSCoalitionObject</a></li>
<li><a href="DCSCommand.html">DCSCommand</a></li>
<li><a href="DCSController.html">DCSController</a></li>
<li><a href="DCSGroup.html">DCSGroup</a></li>
<li><a href="DCSObject.html">DCSObject</a></li>
<li><a href="DCSTask.html">DCSTask</a></li>
<li><a href="DCSTypes.html">DCSTypes</a></li>
<li><a href="DCSUnit.html">DCSUnit</a></li>
<li><a href="DCSVec3.html">DCSVec3</a></li>
<li><a href="DCSWorld.html">DCSWorld</a></li>
<li><a href="DCSZone.html">DCSZone</a></li>
<li><a href="DCScountry.html">DCScountry</a></li>
<li><a href="DCStimer.html">DCStimer</a></li>
<li><a href="DCStrigger.html">DCStrigger</a></li>
<li><a href="Database.html">Database</a></li>
<li><a href="Designate.html">Designate</a></li>
<li><a href="Detection.html">Detection</a></li>
<li><a href="DetectionManager.html">DetectionManager</a></li>
<li><a href="Escort.html">Escort</a></li>
<li><a href="Event.html">Event</a></li>
<li><a href="Fsm.html">Fsm</a></li>
<li><a href="Goal.html">Goal</a></li>
<li><a href="Group.html">Group</a></li>
<li><a href="Identifiable.html">Identifiable</a></li>
<li>Menu</li>
<li><a href="Message.html">Message</a></li>
<li><a href="MissileTrainer.html">MissileTrainer</a></li>
<li><a href="Mission.html">Mission</a></li>
<li><a href="Movement.html">Movement</a></li>
<li><a href="Object.html">Object</a></li>
<li><a href="Point.html">Point</a></li>
<li><a href="Positionable.html">Positionable</a></li>
<li><a href="Process_JTAC.html">Process_JTAC</a></li>
<li><a href="Process_Pickup.html">Process_Pickup</a></li>
<li><a href="Protect.html">Protect</a></li>
<li><a href="Radio.html">Radio</a></li>
<li><a href="Rat.html">Rat</a></li>
<li><a href="Route.html">Route</a></li>
<li><a href="Scenery.html">Scenery</a></li>
<li><a href="ScheduleDispatcher.html">ScheduleDispatcher</a></li>
<li><a href="Scheduler.html">Scheduler</a></li>
<li><a href="Scoring.html">Scoring</a></li>
<li><a href="Sead.html">Sead</a></li>
<li><a href="Set.html">Set</a></li>
<li><a href="Settings.html">Settings</a></li>
<li><a href="Smoke.html">Smoke</a></li>
<li><a href="Spawn.html">Spawn</a></li>
<li><a href="SpawnStatic.html">SpawnStatic</a></li>
<li><a href="Spot.html">Spot</a></li>
<li><a href="Static.html">Static</a></li>
<li><a href="StaticObject.html">StaticObject</a></li>
<li><a href="Task.html">Task</a></li>
<li><a href="TaskZoneCapture.html">TaskZoneCapture</a></li>
<li><a href="Task_A2A.html">Task_A2A</a></li>
<li><a href="Task_A2A_Dispatcher.html">Task_A2A_Dispatcher</a></li>
<li><a href="Task_A2G.html">Task_A2G</a></li>
<li><a href="Task_A2G_Dispatcher.html">Task_A2G_Dispatcher</a></li>
<li><a href="Task_Cargo.html">Task_Cargo</a></li>
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
<li><a href="Unit.html">Unit</a></li>
<li><a href="UserFlag.html">UserFlag</a></li>
<li><a href="UserSound.html">UserSound</a></li>
<li><a href="Utils.html">Utils</a></li>
<li><a href="Velocity.html">Velocity</a></li>
<li><a href="Zone.html">Zone</a></li>
<li><a href="ZoneCaptureCoalition.html">ZoneCaptureCoalition</a></li>
<li><a href="ZoneGoal.html">ZoneGoal</a></li>
<li><a href="ZoneGoalCargo.html">ZoneGoalCargo</a></li>
<li><a href="ZoneGoalCoalition.html">ZoneGoalCoalition</a></li>
<li><a href="env.html">env</a></li>
<li><a href="land.html">land</a></li>
<li><a href="routines.html">routines</a></li>
</ul>
</div>
<div id="content">
<h1>Module <code>Menu</code></h1>
<p><strong>Core</strong> -- MENU_ classes model the definition of <strong>hierarchical menu structures</strong> and <strong>commands for players</strong> within a mission.</p>
<hr/>
<p>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 scanerios 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 <strong>variable parameter</strong> passing for command menus. </p>
<p>There are basically two different MENU class types that you need to use:</p>
<h3>To manage <strong>main menus</strong>, the classes begin with <strong>MENU_</strong>:</h3>
<ul>
<li><a href="Menu.html##(MENU_MISSION)">Menu#MENU_MISSION</a>: Manages main menus for whole mission file.</li>
<li><a href="Menu.html##(MENU_COALITION)">Menu#MENU_COALITION</a>: Manages main menus for whole coalition.</li>
<li><a href="Menu.html##(MENU_GROUP)">Menu#MENU_GROUP</a>: Manages main menus for GROUPs.</li>
</ul>
<h3>To manage <strong>command menus</strong>, which are menus that allow the player to issue <strong>functions</strong>, the classes begin with <strong>MENU<em>COMMAND</em></strong>:</h3>
<ul>
<li><a href="Menu.html##(MENU_MISSION_COMMAND)">Menu#MENU<em>MISSION</em>COMMAND</a>: Manages command menus for whole mission file.</li>
<li><a href="Menu.html##(MENU_COALITION_COMMAND)">Menu#MENU<em>COALITION</em>COMMAND</a>: Manages command menus for whole coalition.</li>
<li><a href="Menu.html##(MENU_GROUP_COMMAND)">Menu#MENU<em>GROUP</em>COMMAND</a>: Manages command menus for GROUPs.</li>
</ul>
<hr/>
<p>- </p>
<h3>Author: <strong>Sven Van de Velde (FlightControl)</strong></h3>
<h3>Contributions:</h3>
<hr/>
<p> </p>
<h2>Global(s)</h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_BASE">MENU_BASE</a></td>
<td class="summary">
<h1>MENU_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The MENU_BASE class defines the main MENU class where other MENU classes are derived from.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_COALITION">MENU_COALITION</a></td>
<td class="summary">
<h1>MENU_COALITION class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h1>
<p>The <a href="Menu.html##(MENU_COALITION)">Menu#MENU_COALITION</a> class manages the main menus for coalitions.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_COALITION_COMMAND">MENU_COALITION_COMMAND</a></td>
<td class="summary">
<h1>MENU<em>COALITION</em>COMMAND class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h1>
<p>The MENU<em>COALITION</em>COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_COMMAND_BASE">MENU_COMMAND_BASE</a></td>
<td class="summary">
<h1>MENU<em>COMMAND</em>BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<hr/>
<p>The MENU<em>COMMAND</em>BASE class defines the main MENU class where other MENU COMMAND_
classes are derived from, in order to set commands.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_GROUP">MENU_GROUP</a></td>
<td class="summary">
<h1>MENU_GROUP class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h1>
<p>The MENU_GROUP class manages the main menus for coalitions.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_GROUP_COMMAND">MENU_GROUP_COMMAND</a></td>
<td class="summary">
<h1>MENU<em>GROUP</em>COMMAND class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h1>
<p>The <a href="Menu.html##(MENU_GROUP_COMMAND)">Menu#MENU<em>GROUP</em>COMMAND</a> class manages the command menus for coalitions, which allow players to execute functions during mission execution.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_INDEX">MENU_INDEX</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_MISSION">MENU_MISSION</a></td>
<td class="summary">
<h1>MENU_MISSION class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h1>
<p>The MENU_MISSION class manages the main menus for a complete mission.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="#MENU_MISSION_COMMAND">MENU_MISSION_COMMAND</a></td>
<td class="summary">
<h1>MENU<em>MISSION</em>COMMAND class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h1>
<p>The MENU<em>MISSION</em>COMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_BASE)">Type <code>MENU_BASE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).ClearParentMenu">MENU_BASE:ClearParentMenu(MenuText)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).GetMenu">MENU_BASE:GetMenu(MenuText)</a></td>
<td class="summary">
<p>Gets a <a href="Menu.html">Menu</a> from a parent <a href="Menu.html">Menu</a></p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).MenuTag">MENU_BASE.MenuTag</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).MenuTime">MENU_BASE.MenuTime</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).New">MENU_BASE.New(#, self, MenuText, ParentMenu)</a></td>
<td class="summary">
<p>Consructor</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).SetParentMenu">MENU_BASE:SetParentMenu(MenuText, Menu)</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).SetTag">MENU_BASE:SetTag(MenuTag)</a></td>
<td class="summary">
<p>Sets a tag for later selection of menu refresh.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).SetTime">MENU_BASE:SetTime(MenuTime)</a></td>
<td class="summary">
<p>Sets a time stamp for later prevention of menu removal.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_COALITION)">Type <code>MENU_COALITION</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).Menus">MENU_COALITION.Menus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).New">MENU_COALITION:New(Coalition, MenuText, ParentMenu)</a></td>
<td class="summary">
<p>MENU_COALITION constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).Remove">MENU_COALITION:Remove(MenuTime, MenuTag)</a></td>
<td class="summary">
<p>Removes the main menu and the sub menus recursively of this MENU_COALITION.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION).RemoveSubMenus">MENU_COALITION:RemoveSubMenus()</a></td>
<td class="summary">
<p>Removes the sub menus recursively of this MENU_COALITION.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_COALITION_COMMAND)">Type <code>MENU_COALITION_COMMAND</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION_COMMAND).New">MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)</a></td>
<td class="summary">
<p>MENU_COALITION constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COALITION_COMMAND).Remove">MENU_COALITION_COMMAND:Remove(MenuTime, MenuTag)</a></td>
<td class="summary">
<p>Removes a radio command item for a coalition</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_COMMAND_BASE)">Type <code>MENU_COMMAND_BASE</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COMMAND_BASE).MenuCallHandler">MENU_COMMAND_BASE.MenuCallHandler</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COMMAND_BASE).New">MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)</a></td>
<td class="summary">
<p>Constructor</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COMMAND_BASE).SetCommandMenuArguments">MENU_COMMAND_BASE.SetCommandMenuArguments(#, self, CommandMenuArguments)</a></td>
<td class="summary">
<p>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!!!</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_COMMAND_BASE).SetCommandMenuFunction">MENU_COMMAND_BASE.SetCommandMenuFunction(#, self, CommandMenuFunction)</a></td>
<td class="summary">
<p>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!!!</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_GROUP)">Type <code>MENU_GROUP</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).Group">MENU_GROUP.Group</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).GroupID">MENU_GROUP.GroupID</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).MenuPath">MENU_GROUP.MenuPath</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).Menus">MENU_GROUP.Menus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).New">MENU_GROUP:New(Group, MenuText, ParentMenu)</a></td>
<td class="summary">
<p>MENU_GROUP constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).Remove">MENU_GROUP:Remove(MenuTime, MenuTag)</a></td>
<td class="summary">
<p>Removes the main menu and sub menus recursively of this MENU_GROUP.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).RemoveSubMenus">MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag)</a></td>
<td class="summary">
<p>Removes the sub menus recursively of this MENU_GROUP.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_GROUP_COMMAND)">Type <code>MENU_GROUP_COMMAND</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).Group">MENU_GROUP_COMMAND.Group</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).GroupID">MENU_GROUP_COMMAND.GroupID</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).MenuPath">MENU_GROUP_COMMAND.MenuPath</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).New">MENU_GROUP_COMMAND:New(Group, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)</a></td>
<td class="summary">
<p>Creates a new radio command item for a group</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).Remove">MENU_GROUP_COMMAND:Remove(MenuTime, MenuTag)</a></td>
<td class="summary">
<p>Removes a menu structure for a group.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_MISSION)">Type <code>MENU_MISSION</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_MISSION).Menus">MENU_MISSION.Menus</a></td>
<td class="summary">
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_MISSION).New">MENU_MISSION:New(MenuText, ParentMenu)</a></td>
<td class="summary">
<p>MENU_MISSION constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_MISSION).Remove">MENU_MISSION:Remove(MenuTime, MenuTag)</a></td>
<td class="summary">
<p>Removes the main menu and the sub menus recursively of this MENU_MISSION.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_MISSION).RemoveSubMenus">MENU_MISSION:RemoveSubMenus()</a></td>
<td class="summary">
<p>Removes the sub menus recursively of this MENU_MISSION.</p>
</td>
</tr>
</table>
<h2><a id="#(MENU_MISSION_COMMAND)">Type <code>MENU_MISSION_COMMAND</code></a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_MISSION_COMMAND).New">MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)</a></td>
<td class="summary">
<p>MENU_MISSION constructor.</p>
</td>
</tr>
<tr>
<td class="name" nowrap="nowrap"><a href="##(MENU_MISSION_COMMAND).Remove">MENU_MISSION_COMMAND:Remove()</a></td>
<td class="summary">
<p>Removes a radio command item for a coalition</p>
</td>
</tr>
</table>
<h2>Global(s)</h2>
<dl class="function">
<dt>
<em><a href="##(MENU_BASE)">#MENU_BASE</a></em>
<a id="MENU_BASE" >
<strong>MENU_BASE</strong>
</a>
</dt>
<dd>
<h1>MENU_BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<p>The MENU_BASE class defines the main MENU class where other MENU classes are derived from.</p>
<p>This is an abstract class, so don't use it.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_COALITION)">#MENU_COALITION</a></em>
<a id="MENU_COALITION" >
<strong>MENU_COALITION</strong>
</a>
</dt>
<dd>
<h1>MENU_COALITION class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h1>
<p>The <a href="Menu.html##(MENU_COALITION)">Menu#MENU_COALITION</a> class manages the main menus for coalitions.</p>
<p>You can add menus with the <a href="##(MENU_COALITION).New">MENU_COALITION.New</a> 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 <a href="##(MENU_COALITION).Remove">MENU_COALITION.Remove</a>.</p>
<h3>Usage:</h3>
<pre class="example"><code> -- 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 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_COALITION_COMMAND)">#MENU_COALITION_COMMAND</a></em>
<a id="MENU_COALITION_COMMAND" >
<strong>MENU_COALITION_COMMAND</strong>
</a>
</dt>
<dd>
<h1>MENU<em>COALITION</em>COMMAND class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h1>
<p>The MENU<em>COALITION</em>COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.</p>
<p>You can add menus with the <a href="##(MENU_COALITION_COMMAND).New">MENU<em>COALITION</em>COMMAND.New</a> method, which constructs a MENU<em>COALITION</em>COMMAND object and returns you the object reference.
Using this object reference, you can then remove ALL the menus and submenus underlying automatically with <a href="##(MENU_COALITION_COMMAND).Remove">MENU<em>COALITION</em>COMMAND.Remove</a>.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_COMMAND_BASE)">#MENU_COMMAND_BASE</a></em>
<a id="MENU_COMMAND_BASE" >
<strong>MENU_COMMAND_BASE</strong>
</a>
</dt>
<dd>
<h1>MENU<em>COMMAND</em>BASE class, extends <a href="Base.html##(BASE)">Base#BASE</a></h1>
<hr/>
<p>The MENU<em>COMMAND</em>BASE class defines the main MENU class where other MENU COMMAND_
classes are derived from, in order to set commands.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_GROUP)">#MENU_GROUP</a></em>
<a id="MENU_GROUP" >
<strong>MENU_GROUP</strong>
</a>
</dt>
<dd>
<h1>MENU_GROUP class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h1>
<p>The MENU_GROUP class manages the main menus for coalitions.</p>
<p>You can add menus with the <a href="##(MENU_GROUP).New">MENU_GROUP.New</a> 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 <a href="##(MENU_GROUP).Remove">MENU_GROUP.Remove</a>.</p>
<h3>Usage:</h3>
<pre class="example"><code> -- 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 )
</code></pre>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_GROUP_COMMAND)">#MENU_GROUP_COMMAND</a></em>
<a id="MENU_GROUP_COMMAND" >
<strong>MENU_GROUP_COMMAND</strong>
</a>
</dt>
<dd>
<h1>MENU<em>GROUP</em>COMMAND class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h1>
<p>The <a href="Menu.html##(MENU_GROUP_COMMAND)">Menu#MENU<em>GROUP</em>COMMAND</a> class manages the command menus for coalitions, which allow players to execute functions during mission execution.</p>
<p>You can add menus with the <a href="##(MENU_GROUP_COMMAND).New">MENU<em>GROUP</em>COMMAND.New</a> method, which constructs a MENU<em>GROUP</em>COMMAND object and returns you the object reference.
Using this object reference, you can then remove ALL the menus and submenus underlying automatically with <a href="##(MENU_GROUP_COMMAND).Remove">MENU<em>GROUP</em>COMMAND.Remove</a>.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="MENU_INDEX" >
<strong>MENU_INDEX</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_MISSION)">#MENU_MISSION</a></em>
<a id="MENU_MISSION" >
<strong>MENU_MISSION</strong>
</a>
</dt>
<dd>
<h1>MENU_MISSION class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h1>
<p>The MENU_MISSION class manages the main menus for a complete mission.</p>
<p>You can add menus with the <a href="##(MENU_MISSION).New">MENU_MISSION.New</a> method, which constructs a MENU_MISSION object and returns you the object reference.
Using this object reference, you can then remove ALL the menus and submenus underlying automatically with <a href="##(MENU_MISSION).Remove">MENU_MISSION.Remove</a>.</p>
</dd>
</dl>
<dl class="function">
<dt>
<em><a href="##(MENU_MISSION_COMMAND)">#MENU_MISSION_COMMAND</a></em>
<a id="MENU_MISSION_COMMAND" >
<strong>MENU_MISSION_COMMAND</strong>
</a>
</dt>
<dd>
<h1>MENU<em>MISSION</em>COMMAND class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h1>
<p>The MENU<em>MISSION</em>COMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.</p>
<p>You can add menus with the <a href="##(MENU_MISSION_COMMAND).New">MENU<em>MISSION</em>COMMAND.New</a> method, which constructs a MENU<em>MISSION</em>COMMAND object and returns you the object reference.
Using this object reference, you can then remove ALL the menus and submenus underlying automatically with <a href="##(MENU_MISSION_COMMAND).Remove">MENU<em>MISSION</em>COMMAND.Remove</a>.</p>
</dd>
</dl>
<h2><a id="#(Menu)" >Type <code>Menu</code></a></h2>
<h2><a id="#(MENU_BASE)" >Type <code>MENU_BASE</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MENU_BASE).ClearParentMenu" >
<strong>MENU_BASE:ClearParentMenu(MenuText)</strong>
</a>
</dt>
<dd>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_BASE).GetMenu" >
<strong>MENU_BASE:GetMenu(MenuText)</strong>
</a>
</dt>
<dd>
<p>Gets a <a href="Menu.html">Menu</a> from a parent <a href="Menu.html">Menu</a></p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string MenuText </em></code>:
The text of the child menu.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_BASE)">#MENU_BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_BASE).MenuTag" >
<strong>MENU_BASE.MenuTag</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_BASE).MenuTime" >
<strong>MENU_BASE.MenuTime</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_BASE).New" >
<strong>MENU_BASE.New(#, self, MenuText, ParentMenu)</strong>
</a>
</dt>
<dd>
<p>Consructor</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> # </em></code>:
ENU_BASE</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
<li>
<p><code><em> ParentMenu </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_BASE)">#MENU_BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_BASE).SetParentMenu" >
<strong>MENU_BASE:SetParentMenu(MenuText, Menu)</strong>
</a>
</dt>
<dd>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
<li>
<p><code><em> Menu </em></code>: </p>
</li>
</ul>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_BASE).SetTag" >
<strong>MENU_BASE:SetTag(MenuTag)</strong>
</a>
</dt>
<dd>
<p>Sets a tag for later selection of menu refresh.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em>#string MenuTag </em></code>:
A Tag or Key that will filter only menu items set with this key.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_BASE)">#MENU_BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_BASE).SetTime" >
<strong>MENU_BASE:SetTime(MenuTime)</strong>
</a>
</dt>
<dd>
<p>Sets a time stamp for later prevention of menu removal.</p>
<h3>Parameter</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_BASE)">#MENU_BASE</a>:</em></p>
</dd>
</dl>
<h2><a id="#(MENU_COALITION)" >Type <code>MENU_COALITION</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MENU_COALITION).Menus" >
<strong>MENU_COALITION.Menus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COALITION).New" >
<strong>MENU_COALITION:New(Coalition, MenuText, ParentMenu)</strong>
</a>
</dt>
<dd>
<p>MENU_COALITION constructor.</p>
<p>Creates a new MENU_COALITION object and creates the menu for a complete coalition.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Dcs.DCSCoalition.html##(coalition.side)">Dcs.DCSCoalition#coalition.side</a> Coalition </em></code>:
The coalition owning the menu.</p>
</li>
<li>
<p><code><em>#string MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em>#table ParentMenu </em></code>:
The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_COALITION)">#MENU_COALITION</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COALITION).Remove" >
<strong>MENU_COALITION:Remove(MenuTime, MenuTag)</strong>
</a>
</dt>
<dd>
<p>Removes the main menu and the sub menus recursively of this MENU_COALITION.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
<li>
<p><code><em> MenuTag </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#nil:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COALITION).RemoveSubMenus" >
<strong>MENU_COALITION:RemoveSubMenus()</strong>
</a>
</dt>
<dd>
<p>Removes the sub menus recursively of this MENU_COALITION.</p>
<p>Note that the main menu is kept!</p>
<h3>Return value</h3>
<p><em><a href="##(MENU_COALITION)">#MENU_COALITION</a>:</em></p>
</dd>
</dl>
<h2><a id="#(MENU_COALITION_COMMAND)" >Type <code>MENU_COALITION_COMMAND</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MENU_COALITION_COMMAND).New" >
<strong>MENU_COALITION_COMMAND:New(Coalition, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)</strong>
</a>
</dt>
<dd>
<p>MENU_COALITION constructor.</p>
<p>Creates a new radio command item for a coalition, which can invoke a function with parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Dcs.DCSCoalition.html##(coalition.side)">Dcs.DCSCoalition#coalition.side</a> Coalition </em></code>:
The coalition owning the menu.</p>
</li>
<li>
<p><code><em>#string MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em><a href="Menu.html##(MENU_COALITION)">Menu#MENU_COALITION</a> ParentMenu </em></code>:
The parent menu.</p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>:
A function that is called when the menu key is pressed.</p>
</li>
<li>
<p><code><em> CommandMenuArgument </em></code>:
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.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_COALITION_COMMAND)">#MENU<em>COALITION</em>COMMAND</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COALITION_COMMAND).Remove" >
<strong>MENU_COALITION_COMMAND:Remove(MenuTime, MenuTag)</strong>
</a>
</dt>
<dd>
<p>Removes a radio command item for a coalition</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
<li>
<p><code><em> MenuTag </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#nil:</em></p>
</dd>
</dl>
<h2><a id="#(MENU_COMMAND_BASE)" >Type <code>MENU_COMMAND_BASE</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em>#function</em>
<a id="#(MENU_COMMAND_BASE).MenuCallHandler" >
<strong>MENU_COMMAND_BASE.MenuCallHandler</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COMMAND_BASE).New" >
<strong>MENU_COMMAND_BASE.New(#, self, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)</strong>
</a>
</dt>
<dd>
<p>Constructor</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> # </em></code>:
ENU<em>COMMAND</em>BASE</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> MenuText </em></code>: </p>
</li>
<li>
<p><code><em> ParentMenu </em></code>: </p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>: </p>
</li>
<li>
<p><code><em> CommandMenuArguments </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_COMMAND_BASE)">#MENU<em>COMMAND</em>BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COMMAND_BASE).SetCommandMenuArguments" >
<strong>MENU_COMMAND_BASE.SetCommandMenuArguments(#, self, CommandMenuArguments)</strong>
</a>
</dt>
<dd>
<p>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!!!</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> # </em></code>:
ENU<em>COMMAND</em>BASE</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> CommandMenuArguments </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_COMMAND_BASE)">#MENU<em>COMMAND</em>BASE</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_COMMAND_BASE).SetCommandMenuFunction" >
<strong>MENU_COMMAND_BASE.SetCommandMenuFunction(#, self, CommandMenuFunction)</strong>
</a>
</dt>
<dd>
<p>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!!!</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> # </em></code>:
ENU<em>COMMAND</em>BASE</p>
</li>
<li>
<p><code><em> self </em></code>: </p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_COMMAND_BASE)">#MENU<em>COMMAND</em>BASE</a>:</em></p>
</dd>
</dl>
<h2><a id="#(MENU_GROUP)" >Type <code>MENU_GROUP</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_GROUP).Group" >
<strong>MENU_GROUP.Group</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_GROUP).GroupID" >
<strong>MENU_GROUP.GroupID</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_GROUP).MenuPath" >
<strong>MENU_GROUP.MenuPath</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_GROUP).Menus" >
<strong>MENU_GROUP.Menus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_GROUP).New" >
<strong>MENU_GROUP:New(Group, MenuText, ParentMenu)</strong>
</a>
</dt>
<dd>
<p>MENU_GROUP constructor.</p>
<p>Creates a new radio menu item for a group.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> Group </em></code>:
The Group owning the menu.</p>
</li>
<li>
<p><code><em>#string MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em>#table ParentMenu </em></code>:
The parent menu.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_GROUP)">#MENU_GROUP</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_GROUP).Remove" >
<strong>MENU_GROUP:Remove(MenuTime, MenuTag)</strong>
</a>
</dt>
<dd>
<p>Removes the main menu and sub menus recursively of this MENU_GROUP.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
<li>
<p><code><em> MenuTag </em></code>:
A Tag or Key to filter the menus to be refreshed with the Tag set.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#nil:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_GROUP).RemoveSubMenus" >
<strong>MENU_GROUP:RemoveSubMenus(MenuTime, MenuTag)</strong>
</a>
</dt>
<dd>
<p>Removes the sub menus recursively of this MENU_GROUP.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
<li>
<p><code><em> MenuTag </em></code>:
A Tag or Key to filter the menus to be refreshed with the Tag set.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_GROUP)">#MENU_GROUP</a>:</em>
self</p>
</dd>
</dl>
<h2><a id="#(MENU_GROUP_COMMAND)" >Type <code>MENU_GROUP_COMMAND</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_GROUP_COMMAND).Group" >
<strong>MENU_GROUP_COMMAND.Group</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_GROUP_COMMAND).GroupID" >
<strong>MENU_GROUP_COMMAND.GroupID</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<em></em>
<a id="#(MENU_GROUP_COMMAND).MenuPath" >
<strong>MENU_GROUP_COMMAND.MenuPath</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_GROUP_COMMAND).New" >
<strong>MENU_GROUP_COMMAND:New(Group, MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)</strong>
</a>
</dt>
<dd>
<p>Creates a new radio command item for a group</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em><a href="Wrapper.Group.html##(GROUP)">Wrapper.Group#GROUP</a> Group </em></code>:
The Group owning the menu.</p>
</li>
<li>
<p><code><em> MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em> ParentMenu </em></code>:
The parent menu.</p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>:
A function that is called when the menu key is pressed.</p>
</li>
<li>
<p><code><em> CommandMenuArgument </em></code>:
An argument for the function.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_GROUP_COMMAND)">#MENU<em>GROUP</em>COMMAND</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_GROUP_COMMAND).Remove" >
<strong>MENU_GROUP_COMMAND:Remove(MenuTime, MenuTag)</strong>
</a>
</dt>
<dd>
<p>Removes a menu structure for a group.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
<li>
<p><code><em> MenuTag </em></code>:
A Tag or Key to filter the menus to be refreshed with the Tag set.</p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#nil:</em></p>
</dd>
</dl>
<h2><a id="#(MENU_MISSION)" >Type <code>MENU_MISSION</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MENU_MISSION).Menus" >
<strong>MENU_MISSION.Menus</strong>
</a>
</dt>
<dd>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_MISSION).New" >
<strong>MENU_MISSION:New(MenuText, ParentMenu)</strong>
</a>
</dt>
<dd>
<p>MENU_MISSION constructor.</p>
<p>Creates a new MENU_MISSION object and creates the menu for a complete mission file.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em>#table ParentMenu </em></code>:
The parent menu. This parameter can be ignored if you want the menu to be located at the perent menu of DCS world (under F10 other).</p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_MISSION)">#MENU_MISSION</a>:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_MISSION).Remove" >
<strong>MENU_MISSION:Remove(MenuTime, MenuTag)</strong>
</a>
</dt>
<dd>
<p>Removes the main menu and the sub menus recursively of this MENU_MISSION.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em> MenuTime </em></code>: </p>
</li>
<li>
<p><code><em> MenuTag </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em>#nil:</em></p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_MISSION).RemoveSubMenus" >
<strong>MENU_MISSION:RemoveSubMenus()</strong>
</a>
</dt>
<dd>
<p>Removes the sub menus recursively of this MENU_MISSION.</p>
<p>Note that the main menu is kept!</p>
<h3>Return value</h3>
<p><em><a href="##(MENU_MISSION)">#MENU_MISSION</a>:</em></p>
</dd>
</dl>
<h2><a id="#(MENU_MISSION_COMMAND)" >Type <code>MENU_MISSION_COMMAND</code></a></h2>
<h3>Field(s)</h3>
<dl class="function">
<dt>
<a id="#(MENU_MISSION_COMMAND).New" >
<strong>MENU_MISSION_COMMAND:New(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArgument, ...)</strong>
</a>
</dt>
<dd>
<p>MENU_MISSION constructor.</p>
<p>Creates a new radio command item for a complete mission file, which can invoke a function with parameters.</p>
<h3>Parameters</h3>
<ul>
<li>
<p><code><em>#string MenuText </em></code>:
The text for the menu.</p>
</li>
<li>
<p><code><em><a href="Menu.html##(MENU_MISSION)">Menu#MENU_MISSION</a> ParentMenu </em></code>:
The parent menu.</p>
</li>
<li>
<p><code><em> CommandMenuFunction </em></code>:
A function that is called when the menu key is pressed.</p>
</li>
<li>
<p><code><em> CommandMenuArgument </em></code>:
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.</p>
</li>
<li>
<p><code><em> ... </em></code>: </p>
</li>
</ul>
<h3>Return value</h3>
<p><em><a href="##(MENU_MISSION_COMMAND)">#MENU<em>MISSION</em>COMMAND</a>:</em>
self</p>
</dd>
</dl>
<dl class="function">
<dt>
<a id="#(MENU_MISSION_COMMAND).Remove" >
<strong>MENU_MISSION_COMMAND:Remove()</strong>
</a>
</dt>
<dd>
<p>Removes a radio command item for a coalition</p>
<h3>Return value</h3>
<p><em>#nil:</em></p>
</dd>
</dl>
</div>
</div>
</body>
</html>