mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
2018 lines
49 KiB
HTML
2018 lines
49 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_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_Patrol.html">AI_Patrol</a></li>
|
|
<li><a href="Account.html">Account</a></li>
|
|
<li><a href="Airbase.html">Airbase</a></li>
|
|
<li><a href="AirbasePolice.html">AirbasePolice</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="Database.html">Database</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="Group.html">Group</a></li>
|
|
<li><a href="Identifiable.html">Identifiable</a></li>
|
|
<li><a href="MOVEMENT.html">MOVEMENT</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="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="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="Smoke.html">Smoke</a></li>
|
|
<li><a href="Spawn.html">Spawn</a></li>
|
|
<li><a href="Static.html">Static</a></li>
|
|
<li><a href="Task.html">Task</a></li>
|
|
<li><a href="Task_A2G.html">Task_A2G</a></li>
|
|
<li><a href="Task_PICKUP.html">Task_PICKUP</a></li>
|
|
<li><a href="Task_SEAD.html">Task_SEAD</a></li>
|
|
<li><a href="Unit.html">Unit</a></li>
|
|
<li><a href="Utils.html">Utils</a></li>
|
|
<li><a href="Zone.html">Zone</a></li>
|
|
<li><a href="routines.html">routines</a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="content">
|
|
<h1>Module <code>Menu</code></h1>
|
|
|
|
<p>This module contains the MENU classes.</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>
|
|
<li><a href="Menu.html##(MENU_CLIENT)">Menu#MENU_CLIENT</a>: Manages main menus for CLIENTs. This manages menus for units with the skill level "Client".</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>
|
|
<li><a href="Menu.html##(MENU_CLIENT_COMMAND)">Menu#MENU<em>CLIENT</em>COMMAND</a>: Manages command menus for CLIENTs. This manages menus for units with the skill level "Client".</li>
|
|
</ul>
|
|
|
|
<hr/>
|
|
|
|
<p>The above menus classes <strong>are derived</strong> from 2 main <strong>abstract</strong> classes defined within the MOOSE framework (so don't use these):</p>
|
|
|
|
<h1>1) MENU_ BASE abstract base classes (don't use them)</h1>
|
|
<p>The underlying base menu classes are <strong>NOT</strong> to be used within your missions.
|
|
These are simply abstract base classes defining a couple of fields that are used by the
|
|
derived MENU_ classes to manage menus.</p>
|
|
|
|
<h2>1.1) <a href="##(MENU_BASE)">#MENU_BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h2>
|
|
<p>The <a href="##(MENU_BASE)">#MENU_BASE</a> class defines the main MENU class where other MENU classes are derived from.</p>
|
|
|
|
<h2>1.2) <a href="##(MENU_COMMAND_BASE)">#MENU<em>COMMAND</em>BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h2>
|
|
<p>The <a href="##(MENU_COMMAND_BASE)">#MENU<em>COMMAND</em>BASE</a> class defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.</p>
|
|
|
|
<hr/>
|
|
|
|
<p><strong>The next menus define the MENU classes that you can use within your missions.</strong></p>
|
|
|
|
<h1>2) MENU MISSION classes</h1>
|
|
<p>The underlying classes manage the menus for a complete mission file.</p>
|
|
|
|
<h2>2.1) <a href="##(MENU_MISSION)">#MENU_MISSION</a> class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_MISSION)">Menu#MENU_MISSION</a> class manages the main menus for a complete mission. <br/>
|
|
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>
|
|
|
|
<h2>2.2) <a href="##(MENU_MISSION_COMMAND)">#MENU<em>MISSION</em>COMMAND</a> class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_MISSION_COMMAND)">Menu#MENU<em>MISSION</em>COMMAND</a> class manages the command menus for a complete mission, which allow players to execute functions during mission execution. <br/>
|
|
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>
|
|
|
|
<hr/>
|
|
|
|
<h1>3) MENU COALITION classes</h1>
|
|
<p>The underlying classes manage the menus for whole coalitions.</p>
|
|
|
|
<h2>3.1) <a href="##(MENU_COALITION)">#MENU_COALITION</a> class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_COALITION)">Menu#MENU_COALITION</a> class manages the main menus for coalitions. <br/>
|
|
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>
|
|
|
|
<h2>3.2) <a href="Menu.html##(MENU_COALITION_COMMAND)">Menu#MENU<em>COALITION</em>COMMAND</a> class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_COALITION_COMMAND)">Menu#MENU<em>COALITION</em>COMMAND</a> class manages the command menus for coalitions, which allow players to execute functions during mission execution. <br/>
|
|
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>
|
|
|
|
<hr/>
|
|
|
|
<h1>4) MENU GROUP classes</h1>
|
|
<p>The underlying classes manage the menus for groups. Note that groups can be inactive, alive or can be destroyed.</p>
|
|
|
|
<h2>4.1) <a href="Menu.html##(MENU_GROUP)">Menu#MENU_GROUP</a> class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_GROUP)">Menu#MENU_GROUP</a> class manages the main menus for coalitions. <br/>
|
|
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>
|
|
|
|
<h2>4.2) <a href="Menu.html##(MENU_GROUP_COMMAND)">Menu#MENU<em>GROUP</em>COMMAND</a> class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h2>
|
|
<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. <br/>
|
|
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>
|
|
|
|
<hr/>
|
|
|
|
<h1>5) MENU CLIENT classes</h1>
|
|
<p>The underlying classes manage the menus for units with skill level client or player.</p>
|
|
|
|
<h2>5.1) <a href="Menu.html##(MENU_CLIENT)">Menu#MENU_CLIENT</a> class, extends <a href="Menu.html##(MENU_BASE)">Menu#MENU_BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_CLIENT)">Menu#MENU_CLIENT</a> class manages the main menus for coalitions. <br/>
|
|
You can add menus with the <a href="##(MENU_CLIENT).New">MENU_CLIENT.New</a> method, which constructs a MENU_CLIENT 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_CLIENT).Remove">MENU_CLIENT.Remove</a>.</p>
|
|
|
|
<h2>5.2) <a href="Menu.html##(MENU_CLIENT_COMMAND)">Menu#MENU<em>CLIENT</em>COMMAND</a> class, extends <a href="Menu.html##(MENU_COMMAND_BASE)">Menu#MENU<em>COMMAND</em>BASE</a></h2>
|
|
<p>The <a href="Menu.html##(MENU_CLIENT_COMMAND)">Menu#MENU<em>CLIENT</em>COMMAND</a> class manages the command menus for coalitions, which allow players to execute functions during mission execution. <br/>
|
|
You can add menus with the <a href="##(MENU_CLIENT_COMMAND).New">MENU<em>CLIENT</em>COMMAND.New</a> method, which constructs a MENU<em>CLIENT</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_CLIENT_COMMAND).Remove">MENU<em>CLIENT</em>COMMAND.Remove</a>.</p>
|
|
|
|
<hr/>
|
|
|
|
<h3>Contributions: -</h3>
|
|
<h3>Authors: FlightControl : Design & Programming</h3>
|
|
|
|
|
|
<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">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_CLIENT">MENU_CLIENT</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_CLIENT_COMMAND">MENU_CLIENT_COMMAND</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_COALITION">MENU_COALITION</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_COALITION_COMMAND">MENU_COALITION_COMMAND</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_COMMAND_BASE">MENU_COMMAND_BASE</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_GROUP">MENU_GROUP</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_GROUP_COMMAND">MENU_GROUP_COMMAND</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_MISSION">MENU_MISSION</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="#MENU_MISSION_COMMAND">MENU_MISSION_COMMAND</a></td>
|
|
<td class="summary">
|
|
|
|
</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).ClassName">MENU_BASE.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).MenuParentPath">MENU_BASE.MenuParentPath</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).MenuPath">MENU_BASE.MenuPath</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).MenuText">MENU_BASE.MenuText</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_BASE).New">MENU_BASE:New(MenuText, ParentMenu)</a></td>
|
|
<td class="summary">
|
|
<p>Consructor</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a id="#(MENU_CLIENT)">Type <code>MENU_CLIENT</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).ClassName">MENU_CLIENT.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).New">MENU_CLIENT:New(Client, MenuText, ParentMenu)</a></td>
|
|
<td class="summary">
|
|
<p>MENU_CLIENT constructor.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).Remove">MENU_CLIENT:Remove()</a></td>
|
|
<td class="summary">
|
|
<p>Removes the sub menus recursively of this MENU_CLIENT.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT).RemoveSubMenus">MENU_CLIENT:RemoveSubMenus()</a></td>
|
|
<td class="summary">
|
|
<p>Removes the sub menus recursively of this <a href="##(MENU_CLIENT)">#MENU_CLIENT</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<h2><a id="#(MENU_CLIENT_COMMAND)">Type <code>MENU_CLIENT_COMMAND</code></a></h2>
|
|
<table class="function_list">
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).ClassName">MENU_CLIENT_COMMAND.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).New">MENU_CLIENT_COMMAND:New(Client, MenuText, ParentMenu, CommandMenuFunction, ...)</a></td>
|
|
<td class="summary">
|
|
<p>MENU<em>CLIENT</em>COMMAND constructor.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_CLIENT_COMMAND).Remove">MENU_CLIENT_COMMAND:Remove()</a></td>
|
|
<td class="summary">
|
|
<p>Removes a menu structure for a client.</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).ClassName">MENU_COALITION.ClassName</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()</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).ClassName">MENU_COALITION_COMMAND.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<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()</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).ClassName">MENU_COMMAND_BASE.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_COMMAND_BASE).CommandMenuArgument">MENU_COMMAND_BASE.CommandMenuArgument</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_COMMAND_BASE).CommandMenuFunction">MENU_COMMAND_BASE.CommandMenuFunction</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<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(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)</a></td>
|
|
<td class="summary">
|
|
<p>Constructor</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).ClassName">MENU_GROUP.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).MenuGroup">MENU_GROUP.MenuGroup</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).MenuGroupID">MENU_GROUP.MenuGroupID</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).MenuText">MENU_GROUP.MenuText</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(MenuGroup, MenuText, ParentMenu)</a></td>
|
|
<td class="summary">
|
|
<p>MENU_GROUP constructor.</p>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).ParentMenu">MENU_GROUP.ParentMenu</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).Path">MENU_GROUP.Path</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP).Remove">MENU_GROUP:Remove()</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()</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).ClassName">MENU_GROUP_COMMAND.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).MenuGroup">MENU_GROUP_COMMAND.MenuGroup</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).MenuGroupID">MENU_GROUP_COMMAND.MenuGroupID</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).MenuText">MENU_GROUP_COMMAND.MenuText</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).New">MENU_GROUP_COMMAND:New(MenuGroup, 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).ParentMenu">MENU_GROUP_COMMAND.ParentMenu</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).Path">MENU_GROUP_COMMAND.Path</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="name" nowrap="nowrap"><a href="##(MENU_GROUP_COMMAND).Remove">MENU_GROUP_COMMAND:Remove()</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).ClassName">MENU_MISSION.ClassName</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()</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).ClassName">MENU_MISSION_COMMAND.ClassName</a></td>
|
|
<td class="summary">
|
|
|
|
</td>
|
|
</tr>
|
|
<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>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(MENU_CLIENT)">#MENU_CLIENT</a></em>
|
|
<a id="MENU_CLIENT" >
|
|
<strong>MENU_CLIENT</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em><a href="##(MENU_CLIENT_COMMAND)">#MENU_CLIENT_COMMAND</a></em>
|
|
<a id="MENU_CLIENT_COMMAND" >
|
|
<strong>MENU_CLIENT_COMMAND</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<h2><a id="#(Menu)" >Type <code>Menu</code></a></h2>
|
|
|
|
<h2><a id="#(MENU_BASE)" >Type <code>MENU_BASE</code></a></h2>
|
|
|
|
<p>The MENU_BASE class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_BASE).ClassName" >
|
|
<strong>MENU_BASE.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_BASE).MenuParentPath" >
|
|
<strong>MENU_BASE.MenuParentPath</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_BASE).MenuPath" >
|
|
<strong>MENU_BASE.MenuPath</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_BASE).MenuText" >
|
|
<strong>MENU_BASE.MenuText</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_BASE).New" >
|
|
<strong>MENU_BASE:New(MenuText, ParentMenu)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Consructor</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em> MenuText </em></code>: </p>
|
|
|
|
</li>
|
|
<li>
|
|
|
|
<p><code><em> ParentMenu </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_CLIENT)" >Type <code>MENU_CLIENT</code></a></h2>
|
|
|
|
<p>MENU_COALITION constructor.</p>
|
|
|
|
|
|
<p>Creates a new radio command item for a coalition, which can invoke a function with parameters.</p>
|
|
|
|
<h3>Usage:</h3>
|
|
<pre class="example"><code> -- This demo creates a menu structure for the two clients of planes.
|
|
-- Each client 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 clients bug is solved.
|
|
|
|
local function ShowStatus( PlaneClient, StatusText, Coalition )
|
|
|
|
MESSAGE:New( Coalition, 15 ):ToRed()
|
|
PlaneClient:Message( StatusText, 15 )
|
|
end
|
|
|
|
local MenuStatus = {}
|
|
|
|
local function RemoveStatusMenu( MenuClient )
|
|
local MenuClientName = MenuClient:GetName()
|
|
MenuStatus[MenuClientName]:Remove()
|
|
end
|
|
|
|
--- @param Wrapper.Client#CLIENT MenuClient
|
|
local function AddStatusMenu( MenuClient )
|
|
local MenuClientName = MenuClient:GetName()
|
|
-- This would create a menu for the red coalition under the MenuCoalitionRed menu object.
|
|
MenuStatus[MenuClientName] = MENU_CLIENT:New( MenuClient, "Status for Planes" )
|
|
MENU_CLIENT_COMMAND:New( MenuClient, "Show Status", MenuStatus[MenuClientName], ShowStatus, MenuClient, "Status of planes is ok!", "Message to Red Coalition" )
|
|
end
|
|
|
|
SCHEDULER:New( nil,
|
|
function()
|
|
local PlaneClient = CLIENT:FindByName( "Plane 1" )
|
|
if PlaneClient and PlaneClient:IsAlive() then
|
|
local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
|
|
MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 1", MenuManage, AddStatusMenu, PlaneClient )
|
|
MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 1", MenuManage, RemoveStatusMenu, PlaneClient )
|
|
end
|
|
end, {}, 10, 10 )
|
|
|
|
SCHEDULER:New( nil,
|
|
function()
|
|
local PlaneClient = CLIENT:FindByName( "Plane 2" )
|
|
if PlaneClient and PlaneClient:IsAlive() then
|
|
local MenuManage = MENU_CLIENT:New( PlaneClient, "Manage Menus" )
|
|
MENU_CLIENT_COMMAND:New( PlaneClient, "Add Status Menu Plane 2", MenuManage, AddStatusMenu, PlaneClient )
|
|
MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient )
|
|
end
|
|
end, {}, 10, 10 )</code></pre>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_CLIENT).ClassName" >
|
|
<strong>MENU_CLIENT.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_CLIENT).New" >
|
|
<strong>MENU_CLIENT:New(Client, MenuText, ParentMenu)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>MENU_CLIENT constructor.</p>
|
|
|
|
|
|
<p>Creates a new radio menu item for a client.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Client.html##(CLIENT)">Wrapper.Client#CLIENT</a> Client </em></code>:
|
|
The Client 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_CLIENT)">#MENU_CLIENT</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_CLIENT).Remove" >
|
|
<strong>MENU_CLIENT:Remove()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes the sub menus recursively of this MENU_CLIENT.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#nil:</em></p>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_CLIENT).RemoveSubMenus" >
|
|
<strong>MENU_CLIENT:RemoveSubMenus()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes the sub menus recursively of this <a href="##(MENU_CLIENT)">#MENU_CLIENT</a>.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="##(MENU_CLIENT)">#MENU_CLIENT</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_CLIENT_COMMAND)" >Type <code>MENU_CLIENT_COMMAND</code></a></h2>
|
|
|
|
<p>The MENU<em>CLIENT</em>COMMAND class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_CLIENT_COMMAND).ClassName" >
|
|
<strong>MENU_CLIENT_COMMAND.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_CLIENT_COMMAND).New" >
|
|
<strong>MENU_CLIENT_COMMAND:New(Client, MenuText, ParentMenu, CommandMenuFunction, ...)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>MENU<em>CLIENT</em>COMMAND constructor.</p>
|
|
|
|
|
|
<p>Creates a new radio command item for a client, which can invoke a function with parameters.</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<li>
|
|
|
|
<p><code><em><a href="Wrapper.Client.html##(CLIENT)">Wrapper.Client#CLIENT</a> Client </em></code>:
|
|
The Client 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_BASE)">#MENU_BASE</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> ... </em></code>: </p>
|
|
|
|
</li>
|
|
</ul>
|
|
<h3>Return value</h3>
|
|
|
|
<p><em><a href="Menu.html##(MENU_CLIENT_COMMAND)">Menu#MENU<em>CLIENT</em>COMMAND</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_CLIENT_COMMAND).Remove" >
|
|
<strong>MENU_CLIENT_COMMAND:Remove()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes a menu structure for a client.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#nil:</em></p>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_COALITION)" >Type <code>MENU_COALITION</code></a></h2>
|
|
|
|
<p>The MENU_COALITION class</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>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_COALITION).ClassName" >
|
|
<strong>MENU_COALITION.ClassName</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()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes the main menu and the sub menus recursively of this MENU_COALITION.</p>
|
|
|
|
<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>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_COALITION_COMMAND)" >Type <code>MENU_COALITION_COMMAND</code></a></h2>
|
|
|
|
<p>The MENU<em>COALITION</em>COMMAND class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_COALITION_COMMAND).ClassName" >
|
|
<strong>MENU_COALITION_COMMAND.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<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>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_COALITION_COMMAND).Remove" >
|
|
<strong>MENU_COALITION_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>
|
|
|
|
<h2><a id="#(MENU_COMMAND_BASE)" >Type <code>MENU_COMMAND_BASE</code></a></h2>
|
|
|
|
<p>The MENU<em>COMMAND</em>BASE class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_COMMAND_BASE).ClassName" >
|
|
<strong>MENU_COMMAND_BASE.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_COMMAND_BASE).CommandMenuArgument" >
|
|
<strong>MENU_COMMAND_BASE.CommandMenuArgument</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_COMMAND_BASE).CommandMenuFunction" >
|
|
<strong>MENU_COMMAND_BASE.CommandMenuFunction</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<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(MenuText, ParentMenu, CommandMenuFunction, CommandMenuArguments)</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Constructor</p>
|
|
|
|
<h3>Parameters</h3>
|
|
<ul>
|
|
<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>
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_GROUP)" >Type <code>MENU_GROUP</code></a></h2>
|
|
|
|
<p>The MENU_GROUP class</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>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_GROUP).ClassName" >
|
|
<strong>MENU_GROUP.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP).MenuGroup" >
|
|
<strong>MENU_GROUP.MenuGroup</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP).MenuGroupID" >
|
|
<strong>MENU_GROUP.MenuGroupID</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>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP).MenuText" >
|
|
<strong>MENU_GROUP.MenuText</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<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(MenuGroup, 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> MenuGroup </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>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP).ParentMenu" >
|
|
<strong>MENU_GROUP.ParentMenu</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP).Path" >
|
|
<strong>MENU_GROUP.Path</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_GROUP).Remove" >
|
|
<strong>MENU_GROUP:Remove()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes the main menu and sub menus recursively of this MENU_GROUP.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#nil:</em></p>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_GROUP).RemoveSubMenus" >
|
|
<strong>MENU_GROUP:RemoveSubMenus()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes the sub menus recursively of this MENU_GROUP.</p>
|
|
|
|
<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>
|
|
|
|
<p>The MENU<em>GROUP</em>COMMAND class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_GROUP_COMMAND).ClassName" >
|
|
<strong>MENU_GROUP_COMMAND.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP_COMMAND).MenuGroup" >
|
|
<strong>MENU_GROUP_COMMAND.MenuGroup</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP_COMMAND).MenuGroupID" >
|
|
<strong>MENU_GROUP_COMMAND.MenuGroupID</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>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP_COMMAND).MenuText" >
|
|
<strong>MENU_GROUP_COMMAND.MenuText</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_GROUP_COMMAND).New" >
|
|
<strong>MENU_GROUP_COMMAND:New(MenuGroup, 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> MenuGroup </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.html##(MENU_GROUP_COMMAND)">Menu#MENU<em>GROUP</em>COMMAND</a>:</em>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP_COMMAND).ParentMenu" >
|
|
<strong>MENU_GROUP_COMMAND.ParentMenu</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em></em>
|
|
<a id="#(MENU_GROUP_COMMAND).Path" >
|
|
<strong>MENU_GROUP_COMMAND.Path</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_GROUP_COMMAND).Remove" >
|
|
<strong>MENU_GROUP_COMMAND:Remove()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes a menu structure for a group.</p>
|
|
|
|
<h3>Return value</h3>
|
|
|
|
<p><em>#nil:</em></p>
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_MISSION)" >Type <code>MENU_MISSION</code></a></h2>
|
|
|
|
<p>The MENU_MISSION class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_MISSION).ClassName" >
|
|
<strong>MENU_MISSION.ClassName</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>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<a id="#(MENU_MISSION).Remove" >
|
|
<strong>MENU_MISSION:Remove()</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
<p>Removes the main menu and the sub menus recursively of this MENU_MISSION.</p>
|
|
|
|
<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>
|
|
self</p>
|
|
|
|
</dd>
|
|
</dl>
|
|
|
|
<h2><a id="#(MENU_MISSION_COMMAND)" >Type <code>MENU_MISSION_COMMAND</code></a></h2>
|
|
|
|
<p>The MENU<em>MISSION</em>COMMAND class</p>
|
|
|
|
<h3>Field(s)</h3>
|
|
<dl class="function">
|
|
<dt>
|
|
|
|
<em>#string</em>
|
|
<a id="#(MENU_MISSION_COMMAND).ClassName" >
|
|
<strong>MENU_MISSION_COMMAND.ClassName</strong>
|
|
</a>
|
|
</dt>
|
|
<dd>
|
|
|
|
|
|
|
|
</dd>
|
|
</dl>
|
|
<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>
|