mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into develop
This commit is contained in:
@@ -106,6 +106,7 @@
|
|||||||
-- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor.
|
-- @field Sound.SRS#MSRS instructmsrs SRS wrapper for range instructor.
|
||||||
-- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue for range instructor.
|
-- @field Sound.SRS#MSRSQUEUE instructsrsQ SRS queue for range instructor.
|
||||||
-- @field #number Coalition Coalition side for the menu, if any.
|
-- @field #number Coalition Coalition side for the menu, if any.
|
||||||
|
-- @field Core.Menu#MENU_MISSION menuF10root Specific user defined root F10 menu.
|
||||||
-- @extends Core.Fsm#FSM
|
-- @extends Core.Fsm#FSM
|
||||||
|
|
||||||
--- *Don't only practice your art, but force your way into its secrets; art deserves that, for it and knowledge can raise man to the Divine.* - Ludwig van Beethoven
|
--- *Don't only practice your art, but force your way into its secrets; art deserves that, for it and knowledge can raise man to the Divine.* - Ludwig van Beethoven
|
||||||
@@ -927,6 +928,16 @@ end
|
|||||||
-- User Functions
|
-- User Functions
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
--- Set the root F10 menu under which the range F10 menu is created.
|
||||||
|
-- @param #RANGE self
|
||||||
|
-- @param Core.Menu#MENU_MISSION menu The root F10 menu.
|
||||||
|
-- @return #RANGE self
|
||||||
|
function RANGE:SetMenuRoot(menu)
|
||||||
|
self.menuF10root=menu
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Set maximal strafing altitude. Player entering a strafe pit above that altitude are not registered for a valid pass.
|
--- Set maximal strafing altitude. Player entering a strafe pit above that altitude are not registered for a valid pass.
|
||||||
-- @param #RANGE self
|
-- @param #RANGE self
|
||||||
-- @param #number maxalt Maximum altitude in meters AGL. Default is 914 m = 3000 ft.
|
-- @param #number maxalt Maximum altitude in meters AGL. Default is 914 m = 3000 ft.
|
||||||
@@ -3347,17 +3358,21 @@ function RANGE:_AddF10Commands( _unitName )
|
|||||||
self.MenuAddedTo[_gid] = true
|
self.MenuAddedTo[_gid] = true
|
||||||
|
|
||||||
-- Range root menu path.
|
-- Range root menu path.
|
||||||
local _rangePath = nil
|
local _rootMenu = nil
|
||||||
|
|
||||||
if RANGE.MenuF10Root then
|
if self.menuF10root then
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
-- MISSION LEVEL --
|
-- MISSION LEVEL --
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
_rootMenu = MENU_GROUP:New( group, self.rangename, self.menuF10root )
|
||||||
|
self:T2(self.lid..string.format("Creating F10 menu for group %s", group:GetName()))
|
||||||
|
|
||||||
|
elseif RANGE.MenuF10Root then
|
||||||
|
|
||||||
-- Main F10 menu: F10/<RANGE.MenuF10Root>/<Range Name>
|
-- Main F10 menu: F10/<RANGE.MenuF10Root>/<Range Name>
|
||||||
-- _rangePath = missionCommands.addSubMenuForGroup(_gid, self.rangename, RANGE.MenuF10Root)
|
_rootMenu = MENU_GROUP:New( group, self.rangename, RANGE.MenuF10Root )
|
||||||
_rangePath = MENU_GROUP:New( group, self.rangename, RANGE.MenuF10Root )
|
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -3367,15 +3382,18 @@ function RANGE:_AddF10Commands( _unitName )
|
|||||||
|
|
||||||
-- Main F10 menu: F10/On the Range/<Range Name>/
|
-- Main F10 menu: F10/On the Range/<Range Name>/
|
||||||
if RANGE.MenuF10[_gid] == nil then
|
if RANGE.MenuF10[_gid] == nil then
|
||||||
-- RANGE.MenuF10[_gid]=missionCommands.addSubMenuForGroup(_gid, "On the Range")
|
self:T2(self.lid..string.format("Creating F10 menu 'On the Range' for group %s", group:GetName()))
|
||||||
RANGE.MenuF10[_gid] = MENU_GROUP:New( group, "On the Range" )
|
else
|
||||||
|
self:T2(self.lid..string.format("F10 menu 'On the Range' already EXISTS for group %s", group:GetName()))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- _rangePath = missionCommands.addSubMenuForGroup(_gid, self.rangename, RANGE.MenuF10[_gid])
|
_rootMenu=RANGE.MenuF10[_gid] or MENU_GROUP:New( group, "On the Range" )
|
||||||
_rangePath = MENU_GROUP:New( group, self.rangename, RANGE.MenuF10[_gid] )
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Range menu
|
||||||
|
local _rangePath = MENU_GROUP:New( group, self.rangename, _rootMenu )
|
||||||
|
|
||||||
local _statsPath = MENU_GROUP:New( group, "Statistics", _rangePath )
|
local _statsPath = MENU_GROUP:New( group, "Statistics", _rangePath )
|
||||||
local _markPath = MENU_GROUP:New( group, "Mark Targets", _rangePath )
|
local _markPath = MENU_GROUP:New( group, "Mark Targets", _rangePath )
|
||||||
local _settingsPath = MENU_GROUP:New( group, "My Settings", _rangePath )
|
local _settingsPath = MENU_GROUP:New( group, "My Settings", _rangePath )
|
||||||
|
|||||||
Reference in New Issue
Block a user