Skip to content

Commit

Permalink
feat: filter out LFG, Journal and Pet buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Kozoaku committed Sep 6, 2022
1 parent 5d3eb94 commit d6248c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/micromenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ function MenuModule:CreateFrames()
end
end

--@non-retail@
if mm.lfg then
self.frames.lfg = CreateFrame("BUTTON", "lfg", parentFrame)
parentFrame = self.frames.lfg
Expand All @@ -294,6 +295,7 @@ function MenuModule:CreateFrames()
self.frames.journal = nil
end
end
--@end-non-retail@

if mm.pvp then
self.frames.pvp = CreateFrame("BUTTON", "pvp", parentFrame)
Expand All @@ -304,6 +306,7 @@ function MenuModule:CreateFrames()
end
end

--@non-retail@
if mm.pet then
self.frames.pet = CreateFrame("BUTTON", "pet", parentFrame)
parentFrame = self.frames.pet
Expand All @@ -312,6 +315,7 @@ function MenuModule:CreateFrames()
self.frames.pet = nil
end
end
--@end-non-retail@

if mm.shop then
self.frames.shop = CreateFrame("BUTTON", "shop", parentFrame)
Expand Down Expand Up @@ -850,6 +854,7 @@ function MenuModule:CreateClickFunctions()
end
end; --talent

--@non-retail@
self.functions.journal = function(self, button, down)
if (not xb.db.profile.modules.microMenu.combatEn) and InCombatLockdown() then return; end
if button == "LeftButton" then
Expand All @@ -870,6 +875,7 @@ function MenuModule:CreateClickFunctions()
ToggleCollectionsJournal()
end
end; --pet
--@end-non-retail@

self.functions.ach = function(self, button, down)
if (not xb.db.profile.modules.microMenu.combatEn) and InCombatLockdown() then return; end
Expand Down Expand Up @@ -1111,6 +1117,7 @@ function MenuModule:GetConfig()
get = function() return xb.db.profile.modules.microMenu.quest; end,
set = function(_, val) xb.db.profile.modules.microMenu.quest = val; self:UpdateMenu(); self:Refresh(); end
},
--@non-retail@
lfg = {
name = L['Show LFG Button'],
order = 10,
Expand All @@ -1125,20 +1132,23 @@ function MenuModule:GetConfig()
get = function() return xb.db.profile.modules.microMenu.journal; end,
set = function(_, val) xb.db.profile.modules.microMenu.journal = val; self:UpdateMenu(); self:Refresh(); end
},
--@end-non-retail@
pvp = {
name = L['Show PVP Button'],
order = 12,
type = "toggle",
get = function() return xb.db.profile.modules.microMenu.pvp; end,
set = function(_, val) xb.db.profile.modules.microMenu.pvp = val; self:UpdateMenu(); self:Refresh(); end
},
--@non-retail@
pet = {
name = L['Show Pets Button'],
order = 13,
type = "toggle",
get = function() return xb.db.profile.modules.microMenu.pet; end,
set = function(_, val) xb.db.profile.modules.microMenu.pet = val; self:UpdateMenu(); self:Refresh(); end
},
--@end-non-retail@
shop = {
name = L['Show Shop Button'],
order = 14,
Expand Down

0 comments on commit d6248c0

Please sign in to comment.