mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Fixed bug in MENU_GROUP_COMMAND
This commit is contained in:
parent
dddcb42e32
commit
a6830237f4
@ -140,8 +140,9 @@ do -- MENU_COMMAND_BASE
|
|||||||
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
|
local self = BASE:Inherit( self, MENU_BASE:New( MenuText, ParentMenu ) )
|
||||||
|
|
||||||
self.CommandMenuFunction = CommandMenuFunction
|
self.CommandMenuFunction = CommandMenuFunction
|
||||||
self.MenuCallHandler = function( CommandMenuArguments )
|
self.CommandMenuArguments = CommandMenuArguments
|
||||||
self.CommandMenuFunction( unpack( CommandMenuArguments ) )
|
self.MenuCallHandler = function()
|
||||||
|
self.CommandMenuFunction( unpack( self.CommandMenuArguments ) )
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
@ -893,7 +894,9 @@ do
|
|||||||
if MenuGroup._Menus[Path] then
|
if MenuGroup._Menus[Path] then
|
||||||
self = MenuGroup._Menus[Path]
|
self = MenuGroup._Menus[Path]
|
||||||
self:F2( { "Re-using Group Command Menu:", MenuGroup:GetName(), MenuText } )
|
self:F2( { "Re-using Group Command Menu:", MenuGroup:GetName(), MenuText } )
|
||||||
else
|
missionCommands.removeItemForGroup( self.MenuGroupID, self.MenuPath )
|
||||||
|
|
||||||
|
end
|
||||||
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
|
self = BASE:Inherit( self, MENU_COMMAND_BASE:New( MenuText, ParentMenu, CommandMenuFunction, arg ) )
|
||||||
|
|
||||||
--if MenuGroup:IsAlive() then
|
--if MenuGroup:IsAlive() then
|
||||||
@ -914,7 +917,7 @@ do
|
|||||||
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount + 1
|
self.ParentMenu.MenuCount = self.ParentMenu.MenuCount + 1
|
||||||
self:F2( { ParentMenu.Menus, MenuText } )
|
self:F2( { ParentMenu.Menus, MenuText } )
|
||||||
end
|
end
|
||||||
end
|
-- end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|||||||
@ -745,6 +745,7 @@ function TASK:SetPlannedMenuForGroup( TaskGroup, MenuTime )
|
|||||||
local ReportTaskMenu = MENU_GROUP_COMMAND:New( TaskGroup, string.format( "Report Task Status" ), TaskTypeMenu, self.MenuTaskStatus, self, TaskGroup ):SetTime( MenuTime ):SetTag( "Tasking" ):SetRemoveParent( true )
|
local ReportTaskMenu = MENU_GROUP_COMMAND:New( TaskGroup, string.format( "Report Task Status" ), TaskTypeMenu, self.MenuTaskStatus, self, TaskGroup ):SetTime( MenuTime ):SetTag( "Tasking" ):SetRemoveParent( true )
|
||||||
|
|
||||||
if not Mission:IsGroupAssigned( TaskGroup ) then
|
if not Mission:IsGroupAssigned( TaskGroup ) then
|
||||||
|
self:F( { "Replacing Join Task menu" } )
|
||||||
local JoinTaskMenu = MENU_GROUP_COMMAND:New( TaskGroup, string.format( "Join Task" ), TaskTypeMenu, self.MenuAssignToGroup, self, TaskGroup ):SetTime( MenuTime ):SetTag( "Tasking" ):SetRemoveParent( true )
|
local JoinTaskMenu = MENU_GROUP_COMMAND:New( TaskGroup, string.format( "Join Task" ), TaskTypeMenu, self.MenuAssignToGroup, self, TaskGroup ):SetTime( MenuTime ):SetTag( "Tasking" ):SetRemoveParent( true )
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user