raid-hide-party: add option to hide party frames
This commit is contained in:
@@ -35,6 +35,7 @@ mods\chat-text-shadow.lua
|
|||||||
# raid frames
|
# raid frames
|
||||||
mods\raid.lua
|
mods\raid.lua
|
||||||
mods\raid-party.lua
|
mods\raid-party.lua
|
||||||
|
mods\raid-hide-party.lua
|
||||||
|
|
||||||
# reduced actionbar size
|
# reduced actionbar size
|
||||||
mods\reduced-actionbar-bags.lua
|
mods\reduced-actionbar-bags.lua
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
local _G = ShaguTweaks.GetGlobalEnv()
|
||||||
|
local T = ShaguTweaks.T
|
||||||
|
|
||||||
|
local module = ShaguTweaks:register({
|
||||||
|
title = T["Hide Party Frames"],
|
||||||
|
description = T["Disable default party frames while the raidframes are active."],
|
||||||
|
expansions = { ["vanilla"] = true, ["tbc"] = false },
|
||||||
|
category = T["Raid Frames"],
|
||||||
|
maintainer = "@shagu (GitHub)",
|
||||||
|
enabled = nil,
|
||||||
|
})
|
||||||
|
|
||||||
|
module.enable = function(self)
|
||||||
|
local show = _G['PartyMemberFrame1'].Show
|
||||||
|
local hide = function() return end
|
||||||
|
|
||||||
|
local scanner = CreateFrame("Frame", nil, UIParent)
|
||||||
|
scanner:SetScript("OnUpdate", function()
|
||||||
|
if ShaguTweaksRaidFrame and ShaguTweaksRaidFrame:IsShown() then
|
||||||
|
--print("REMOVE GROUP")
|
||||||
|
if not this.disable then
|
||||||
|
-- disable all party frames
|
||||||
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
|
local frame = _G['PartyMemberFrame' .. i]
|
||||||
|
if frame then
|
||||||
|
frame.Show = hide
|
||||||
|
frame:Hide()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
this.disable = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
--print("RESTORE GROUP")
|
||||||
|
if this.disable then
|
||||||
|
-- enable all party frames
|
||||||
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
|
for i = 1, MAX_PARTY_MEMBERS do
|
||||||
|
local frame = _G['PartyMemberFrame' .. i]
|
||||||
|
if frame then
|
||||||
|
frame.Show = show
|
||||||
|
if GetPartyMember(i) then
|
||||||
|
frame:Show()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
this.disable = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user