mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
MENU documentation update
This commit is contained in:
@@ -27,109 +27,26 @@
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- The above menus classes **are derived** from 2 main **abstract** classes defined within the MOOSE framework (so don't use these):
|
||||
-- # **AUTHORS and CONTRIBUTIONS**
|
||||
--
|
||||
-- 1) MENU_ BASE abstract base classes (don't use them)
|
||||
-- ====================================================
|
||||
-- The underlying base menu classes are **NOT** 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.
|
||||
-- ### Contributions:
|
||||
--
|
||||
-- 1.1) @{#MENU_BASE} class, extends @{Base#BASE}
|
||||
-- --------------------------------------------------
|
||||
-- The @{#MENU_BASE} class defines the main MENU class where other MENU classes are derived from.
|
||||
--
|
||||
-- 1.2) @{#MENU_COMMAND_BASE} class, extends @{Base#BASE}
|
||||
-- ----------------------------------------------------------
|
||||
-- The @{#MENU_COMMAND_BASE} class defines the main MENU class where other MENU COMMAND_ classes are derived from, in order to set commands.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- **The next menus define the MENU classes that you can use within your missions.**
|
||||
--
|
||||
-- 2) MENU MISSION classes
|
||||
-- ======================
|
||||
-- The underlying classes manage the menus for a complete mission file.
|
||||
--
|
||||
-- 2.1) @{#MENU_MISSION} class, extends @{Menu#MENU_BASE}
|
||||
-- ---------------------------------------------------------
|
||||
-- The @{Menu#MENU_MISSION} class manages the main menus for a complete mission.
|
||||
-- You can add menus with the @{#MENU_MISSION.New} 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 @{#MENU_MISSION.Remove}.
|
||||
--
|
||||
-- 2.2) @{#MENU_MISSION_COMMAND} class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
-- -------------------------------------------------------------------------
|
||||
-- The @{Menu#MENU_MISSION_COMMAND} class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_MISSION_COMMAND.New} method, which constructs a MENU_MISSION_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_MISSION_COMMAND.Remove}.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- 3) MENU COALITION classes
|
||||
-- =========================
|
||||
-- The underlying classes manage the menus for whole coalitions.
|
||||
--
|
||||
-- 3.1) @{#MENU_COALITION} class, extends @{Menu#MENU_BASE}
|
||||
-- ------------------------------------------------------------
|
||||
-- The @{Menu#MENU_COALITION} class manages the main menus for coalitions.
|
||||
-- You can add menus with the @{#MENU_COALITION.New} method, which constructs a MENU_COALITION object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_COALITION.Remove}.
|
||||
--
|
||||
-- 3.2) @{Menu#MENU_COALITION_COMMAND} class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- The @{Menu#MENU_COALITION_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_COALITION_COMMAND.New} method, which constructs a MENU_COALITION_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_COALITION_COMMAND.Remove}.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- 4) MENU GROUP classes
|
||||
-- =====================
|
||||
-- The underlying classes manage the menus for groups. Note that groups can be inactive, alive or can be destroyed.
|
||||
--
|
||||
-- 4.1) @{Menu#MENU_GROUP} class, extends @{Menu#MENU_BASE}
|
||||
-- --------------------------------------------------------
|
||||
-- The @{Menu#MENU_GROUP} class manages the main menus for coalitions.
|
||||
-- You can add menus with the @{#MENU_GROUP.New} method, which constructs a MENU_GROUP object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_GROUP.Remove}.
|
||||
--
|
||||
-- 4.2) @{Menu#MENU_GROUP_COMMAND} class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
-- ------------------------------------------------------------------------
|
||||
-- The @{Menu#MENU_GROUP_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_GROUP_COMMAND.New} method, which constructs a MENU_GROUP_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_GROUP_COMMAND.Remove}.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- 5) MENU CLIENT classes
|
||||
-- ======================
|
||||
-- The underlying classes manage the menus for units with skill level client or player.
|
||||
--
|
||||
-- 5.1) @{Menu#MENU_CLIENT} class, extends @{Menu#MENU_BASE}
|
||||
-- ---------------------------------------------------------
|
||||
-- The @{Menu#MENU_CLIENT} class manages the main menus for coalitions.
|
||||
-- You can add menus with the @{#MENU_CLIENT.New} 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 @{#MENU_CLIENT.Remove}.
|
||||
--
|
||||
-- 5.2) @{Menu#MENU_CLIENT_COMMAND} class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
-- -------------------------------------------------------------------------
|
||||
-- The @{Menu#MENU_CLIENT_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_CLIENT_COMMAND.New} method, which constructs a MENU_CLIENT_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_CLIENT_COMMAND.Remove}.
|
||||
--
|
||||
-- ===
|
||||
--
|
||||
-- ### Contributions: -
|
||||
-- ### Authors: FlightControl : Design & Programming
|
||||
-- ### Authors:
|
||||
--
|
||||
-- * **FlightControl**: Design & Programming
|
||||
--
|
||||
-- @module Menu
|
||||
|
||||
|
||||
do -- MENU_BASE
|
||||
|
||||
--- The MENU_BASE class
|
||||
-- @type MENU_BASE
|
||||
--- @type MENU_BASE
|
||||
-- @extends Base#BASE
|
||||
|
||||
--- # MENU_BASE class, extends @{Base#BASE}
|
||||
-- The MENU_BASE class defines the main MENU class where other MENU classes are derived from.
|
||||
-- This is an abstract class, so don't use it.
|
||||
-- @field #MENU_BASE
|
||||
MENU_BASE = {
|
||||
ClassName = "MENU_BASE",
|
||||
MenuPath = nil,
|
||||
@@ -193,10 +110,15 @@ end
|
||||
|
||||
do -- MENU_COMMAND_BASE
|
||||
|
||||
--- The MENU_COMMAND_BASE class
|
||||
-- @type MENU_COMMAND_BASE
|
||||
--- @type MENU_COMMAND_BASE
|
||||
-- @field #function MenuCallHandler
|
||||
-- @extends Core.Menu#MENU_BASE
|
||||
|
||||
--- # MENU_COMMAND_BASE class, extends @{Base#BASE}
|
||||
-- ----------------------------------------------------------
|
||||
-- The MENU_COMMAND_BASE class defines the main MENU class where other MENU COMMAND_
|
||||
-- classes are derived from, in order to set commands.
|
||||
-- @field #MENU_COMMAND_BASE
|
||||
MENU_COMMAND_BASE = {
|
||||
ClassName = "MENU_COMMAND_BASE",
|
||||
CommandMenuFunction = nil,
|
||||
@@ -224,9 +146,15 @@ end
|
||||
|
||||
do -- MENU_MISSION
|
||||
|
||||
--- The MENU_MISSION class
|
||||
-- @type MENU_MISSION
|
||||
--- @type MENU_MISSION
|
||||
-- @extends Core.Menu#MENU_BASE
|
||||
|
||||
--- # MENU_MISSION class, extends @{Menu#MENU_BASE}
|
||||
--
|
||||
-- The MENU_MISSION class manages the main menus for a complete mission.
|
||||
-- You can add menus with the @{#MENU_MISSION.New} 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 @{#MENU_MISSION.Remove}.
|
||||
-- @field #MENU_MISSION
|
||||
MENU_MISSION = {
|
||||
ClassName = "MENU_MISSION"
|
||||
}
|
||||
@@ -291,9 +219,16 @@ end
|
||||
|
||||
do -- MENU_MISSION_COMMAND
|
||||
|
||||
--- The MENU_MISSION_COMMAND class
|
||||
-- @type MENU_MISSION_COMMAND
|
||||
--- @type MENU_MISSION_COMMAND
|
||||
-- @extends Core.Menu#MENU_COMMAND_BASE
|
||||
|
||||
--- # MENU_MISSION_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
--
|
||||
-- The MENU_MISSION_COMMAND class manages the command menus for a complete mission, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_MISSION_COMMAND.New} method, which constructs a MENU_MISSION_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_MISSION_COMMAND.Remove}.
|
||||
--
|
||||
-- @field #MENU_MISSION_COMMAND
|
||||
MENU_MISSION_COMMAND = {
|
||||
ClassName = "MENU_MISSION_COMMAND"
|
||||
}
|
||||
@@ -341,9 +276,16 @@ end
|
||||
|
||||
do -- MENU_COALITION
|
||||
|
||||
--- The MENU_COALITION class
|
||||
-- @type MENU_COALITION
|
||||
--- @type MENU_COALITION
|
||||
-- @extends Core.Menu#MENU_BASE
|
||||
|
||||
--- # MENU_COALITION class, extends @{Menu#MENU_BASE}
|
||||
--
|
||||
-- The @{Menu#MENU_COALITION} class manages the main menus for coalitions.
|
||||
-- You can add menus with the @{#MENU_COALITION.New} method, which constructs a MENU_COALITION object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_COALITION.Remove}.
|
||||
--
|
||||
--
|
||||
-- @usage
|
||||
-- -- This demo creates a menu structure for the planes within the red coalition.
|
||||
-- -- To test, join the planes, then look at the other radio menus (Option F10).
|
||||
@@ -380,6 +322,8 @@ do -- MENU_COALITION
|
||||
--
|
||||
-- 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 )
|
||||
--
|
||||
-- @field #MENU_COALITION
|
||||
MENU_COALITION = {
|
||||
ClassName = "MENU_COALITION"
|
||||
}
|
||||
@@ -446,9 +390,16 @@ end
|
||||
|
||||
do -- MENU_COALITION_COMMAND
|
||||
|
||||
--- The MENU_COALITION_COMMAND class
|
||||
-- @type MENU_COALITION_COMMAND
|
||||
--- @type MENU_COALITION_COMMAND
|
||||
-- @extends Core.Menu#MENU_COMMAND_BASE
|
||||
|
||||
--- # MENU_COALITION_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
--
|
||||
-- The MENU_COALITION_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_COALITION_COMMAND.New} method, which constructs a MENU_COALITION_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_COALITION_COMMAND.Remove}.
|
||||
--
|
||||
-- @field #MENU_COALITION_COMMAND
|
||||
MENU_COALITION_COMMAND = {
|
||||
ClassName = "MENU_COALITION_COMMAND"
|
||||
}
|
||||
@@ -506,6 +457,14 @@ do -- MENU_CLIENT
|
||||
--- MENU_COALITION constructor. Creates a new radio command item for a coalition, which can invoke a function with parameters.
|
||||
-- @type MENU_CLIENT
|
||||
-- @extends Core.Menu#MENU_BASE
|
||||
|
||||
|
||||
--- # MENU_CLIENT class, extends @{Menu#MENU_BASE}
|
||||
--
|
||||
-- The MENU_CLIENT class manages the main menus for coalitions.
|
||||
-- You can add menus with the @{#MENU_CLIENT.New} 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 @{#MENU_CLIENT.Remove}.
|
||||
--
|
||||
-- @usage
|
||||
-- -- This demo creates a menu structure for the two clients of planes.
|
||||
-- -- Each client will receive a different menu structure.
|
||||
@@ -555,6 +514,8 @@ do -- MENU_CLIENT
|
||||
-- MENU_CLIENT_COMMAND:New( PlaneClient, "Remove Status Menu Plane 2", MenuManage, RemoveStatusMenu, PlaneClient )
|
||||
-- end
|
||||
-- end, {}, 10, 10 )
|
||||
--
|
||||
-- @field #MENU_CLIENT
|
||||
MENU_CLIENT = {
|
||||
ClassName = "MENU_CLIENT"
|
||||
}
|
||||
@@ -644,9 +605,16 @@ do -- MENU_CLIENT
|
||||
end
|
||||
|
||||
|
||||
--- The MENU_CLIENT_COMMAND class
|
||||
-- @type MENU_CLIENT_COMMAND
|
||||
--- @type MENU_CLIENT_COMMAND
|
||||
-- @extends Core.Menu#MENU_COMMAND
|
||||
|
||||
--- # MENU_CLIENT_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
--
|
||||
-- The MENU_CLIENT_COMMAND class manages the command menus for coalitions, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_CLIENT_COMMAND.New} method, which constructs a MENU_CLIENT_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_CLIENT_COMMAND.Remove}.
|
||||
--
|
||||
-- @field #MENU_CLIENT_COMMAND
|
||||
MENU_CLIENT_COMMAND = {
|
||||
ClassName = "MENU_CLIENT_COMMAND"
|
||||
}
|
||||
@@ -730,9 +698,16 @@ do
|
||||
-- These menu classes are handling this logic with this variable.
|
||||
local _MENUGROUPS = {}
|
||||
|
||||
--- The MENU_GROUP class
|
||||
-- @type MENU_GROUP
|
||||
--- @type MENU_GROUP
|
||||
-- @extends Core.Menu#MENU_BASE
|
||||
|
||||
|
||||
--- #MENU_GROUP class, extends @{Menu#MENU_BASE}
|
||||
--
|
||||
-- The MENU_GROUP class manages the main menus for coalitions.
|
||||
-- You can add menus with the @{#MENU_GROUP.New} method, which constructs a MENU_GROUP object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_GROUP.Remove}.
|
||||
--
|
||||
-- @usage
|
||||
-- -- This demo creates a menu structure for the two groups of planes.
|
||||
-- -- Each group will receive a different menu structure.
|
||||
@@ -783,6 +758,7 @@ do
|
||||
-- end
|
||||
-- end, {}, 10, 10 )
|
||||
--
|
||||
-- @field #MENU_GROUP
|
||||
MENU_GROUP = {
|
||||
ClassName = "MENU_GROUP"
|
||||
}
|
||||
@@ -876,9 +852,16 @@ do
|
||||
end
|
||||
|
||||
|
||||
--- The MENU_GROUP_COMMAND class
|
||||
-- @type MENU_GROUP_COMMAND
|
||||
--- @type MENU_GROUP_COMMAND
|
||||
-- @extends Core.Menu#MENU_BASE
|
||||
|
||||
--- # MENU_GROUP_COMMAND class, extends @{Menu#MENU_COMMAND_BASE}
|
||||
--
|
||||
-- The @{Menu#MENU_GROUP_COMMAND} class manages the command menus for coalitions, which allow players to execute functions during mission execution.
|
||||
-- You can add menus with the @{#MENU_GROUP_COMMAND.New} method, which constructs a MENU_GROUP_COMMAND object and returns you the object reference.
|
||||
-- Using this object reference, you can then remove ALL the menus and submenus underlying automatically with @{#MENU_GROUP_COMMAND.Remove}.
|
||||
--
|
||||
-- @field #MENU_GROUP_COMMAND
|
||||
MENU_GROUP_COMMAND = {
|
||||
ClassName = "MENU_GROUP_COMMAND"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user