Commit a02bc998 authored by Azilroka's avatar Azilroka
Browse files

DT: Missons Left Click

parent 7ebd6daa
......@@ -14,6 +14,7 @@ local C_Garrison_HasGarrison = C_Garrison.HasGarrison
local C_Garrison_GetBuildings = C_Garrison.GetBuildings
local C_Garrison_GetInProgressMissions = C_Garrison.GetInProgressMissions
local C_Garrison_GetLandingPageShipmentInfo = C_Garrison.GetLandingPageShipmentInfo
local C_Garrison_GetLandingPageGarrisonType = C_Garrison.GetLandingPageGarrisonType
local C_Garrison_GetCompleteTalent = C_Garrison.GetCompleteTalent
local C_Garrison_GetFollowerShipments = C_Garrison.GetFollowerShipments
local C_Garrison_GetLandingPageShipmentInfoByContainerID = C_Garrison.GetLandingPageShipmentInfoByContainerID
......@@ -308,11 +309,21 @@ local function OnEnter()
DT.tooltip:Show()
end
local function OnClick(self)
local function OnClick(self, btn)
if InCombatLockdown() then _G.UIErrorsFrame:AddMessage(E.InfoColor.._G.ERR_NOT_IN_COMBAT) return end
DT:SetEasyMenuAnchor(DT.EasyMenu, self)
_G.EasyMenu(menuList, DT.EasyMenu, nil, nil, nil, 'MENU')
local isShown = _G.GarrisonLandingPage and _G.GarrisonLandingPage:IsShown()
if btn == 'RightButton' then
DT:SetEasyMenuAnchor(DT.EasyMenu, self)
_G.EasyMenu(menuList, DT.EasyMenu, nil, nil, nil, 'MENU')
else
if (not isShown) then
LandingPage(nil, C_Garrison_GetLandingPageGarrisonType())
elseif isShown then
HideUIPanel(_G.GarrisonLandingPage)
end
end
end
local function OnEvent(self, event, ...)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment