Added MENU_MISSION classes and fixed bug in SCORING

-- Added class MENU_MISSION
-- Added class MENU_MISSION_COMMAND
-- Revised documentation of Menu
-- Fixed bug in SCORING class to set the scoring menu
This commit is contained in:
FlightControl
2016-07-23 10:57:10 +02:00
parent 2befd34681
commit e55a7716fb
13 changed files with 766 additions and 58561 deletions

View File

@@ -112,25 +112,28 @@ On top, MOOSE implements <strong>variable parameter</strong> passing for command
<h3>To manage <strong>main menus</strong>, the classes begin with <strong>MENU_</strong>:</h3>
<ul>
<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>
<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_COALITION)">Menu#MENU_COALITION</a>: Manages main menus for whole COALITIONs.</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_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>
<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_COALITION_COMMAND)">Menu#MENU<em>COALITION</em>COMMAND</a>: Manages command menus for whole COALITIONs.</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 classes (don't use them)</h1>
<p>The underlying base menu classes are not to be used within your missions. They simply are abstract classes defining a couple of fields that are used by the
<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.html##(MENU_BASE)">Menu#MENU_BASE</a> class, extends <a href="Base.html##(BASE)">Base#BASE</a></h2>
@@ -141,39 +144,35 @@ derived MENU_ classes to manage menus.</p>
<hr/>
<p>The next menus define the MENU classes that you can use within your missions:</p>
<p><strong>The next menus define the MENU classes that you can use within your missions.</strong></p>
<h1>2) MENU COALITION classes</h1>
<p>The underlying classes manage the menus for whole coalitions.</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.html##(MENU_COALITION)">Menu#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>.
Refer to the respective methods documentation for usage examples.</p>
<h2>2.1) <a href="Menu.html##(MENU_MISSION)">Menu#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.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>.
Refer to the respective methods documentation for usage examples.</p>
<h2>2.2) <a href="Menu.html##(MENU_MISSION_COMMAND)">Menu#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 CLIENT classes</h1>
<p>The underlying classes manage the menus for units with skill level client or player.</p>
<h1>3) MENU COALITION classes</h1>
<p>The underlying classes manage the menus for whole coalitions.</p>
<h2>3.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>.
Refer to the respective methods documentation for usage examples.</p>
<h2>3.1) <a href="Menu.html##(MENU_COALITION)">Menu#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_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>.
Refer to the respective methods documentation for usage examples.</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/>
@@ -183,14 +182,27 @@ Refer to the respective methods documentation for usage examples.</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>.
Refer to the respective methods documentation for usage examples.</p>
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>.
Refer to the respective methods documentation for usage examples.</p>
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/>
@@ -246,6 +258,18 @@ Refer to the respective methods documentation for usage examples.</p>
<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>
@@ -463,6 +487,56 @@ Refer to the respective methods documentation for usage examples.</p>
<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>
@@ -578,6 +652,34 @@ Refer to the respective methods documentation for usage examples.</p>
</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>
@@ -1494,6 +1596,192 @@ self</p>
<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>