local _, cfg = ... --import config
--[[
Cause I wanted to do it!
--10leej
]]
local function CreateBackdrop(frame)
frame:SetBackdrop({bgFile = cfg.backdrop, edgeFile = "Interface\\Buttons\\WHITE8x8", edgeSize = cfg.pixelbordersize,
insets = {top = 2, left = 2, bottom = 2, right = 2}})
frame:SetBackdropColor(unpack(cfg.bColor))
frame:SetBackdropBorderColor(unpack(cfg.bColor))
if isBeautiful then
frame:CreateBeautyBorder(cfg.border.size.large)
frame:SetBeautyBorderTexture(cfg.border.texture)
frame:SetBeautyBorderColor(unpack(cfg.border.color))
end
end
--Hide Group # tag on raid frames
local inInstanceGroup = IsInGroup(LE_PARTY_CATEGORY_INSTANCE)
if inInstanceGroup then
print("DEBUG: Player is in an instance group!")
elseif IsInGroup() then
print("DEBUG: Player is in a normal group!")
elseif IsInRaid() then
print("DEBUG: Player is in a raid group!")
b = CreateFrame("Frame")
b:SetScript("OnEvent", function(self, event, ...)
if event == "GROUP_ROSTER_UPDATE" then
CompactRaidGroup1Title:Hide()
CompactRaidGroup2Title:Hide()
CompactRaidGroup3Title:Hide()
CompactRaidGroup4Title:Hide()
CompactRaidGroup5Title:Hide()
CompactRaidGroup6Title:Hide()
CompactRaidGroup7Title:Hide()
CompactRaidGroup8Title:Hide()
end
end)
b:RegisterEvent("PLAYER_LOGIN")
b:RegisterEvent("GROUP_ROSTER_UPDATE")
b:RegisterEvent("ADDON_LOADED")
end
--Make frames more resizable (RaidFrameResizer)
local n,w,h="CompactUnitFrameProfilesGeneralOptionsFrame" h,w=
_G[n.."HeightSlider"],
_G[n.."WidthSlider"]
h:SetMinMaxValues(1,150) --height
w:SetMinMaxValues(1,150) --width
--Skin the RaidManager
if not CompactRaidFrameManager then LoadAddOn("Blizzard_CompactRaidFrames") end
--hide stuff
local buttons = {
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterRoleTank,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterRoleHealer,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterRoleDamager,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup1,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup2,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup3,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup4,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup5,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup6,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup7,
CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup8,
CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll,
CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck,
CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton,
CompactRaidFrameManagerDisplayFrameLockedModeToggle,
CompactRaidFrameManagerDisplayFrameHiddenModeToggle,
CompactRaidFrameManagerDisplayFrameConvertToRaid
}
CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton.SetNormalTexture = function() end
for _, button in pairs(buttons) do
for i = 1, 3 do
select(i, button:GetRegions()):SetAlpha(0)
end
end
for i = 1, 8 do
select(i, CompactRaidFrameManager:GetRegions()):Hide()
end
select(1, CompactRaidFrameManagerDisplayFrameFilterOptions:GetRegions()):Hide()
select(1, CompactRaidFrameManagerDisplayFrame:GetRegions()):Hide()
select(4, CompactRaidFrameManagerDisplayFrame:GetRegions()):Hide()
local bd = CreateFrame("Frame", nil, CompactRaidFrameManager)
bd:SetPoint("TOPLEFT", CompactRaidFrameManager, "TOPLEFT")
bd:SetPoint("BOTTOMRIGHT", CompactRaidFrameManager, "BOTTOMRIGHT", -9, 9)
--now we skin it and yes it's really this simple :)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterRoleTank)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterRoleHealer)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterRoleDamager)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup1)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup2)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup3)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup4)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup5)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup6)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup7)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameFilterOptionsFilterGroup8)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateRolePoll)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameLeaderOptionsInitiateReadyCheck)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameLockedModeToggle)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameHiddenModeToggle)
CreateBackdrop(CompactRaidFrameManagerDisplayFrameConvertToRaid)
CreateBackdrop(CompactRaidFrameManager)
CompactRaidFrameManagerToggleButton:SetNormalTexture("Interface\\AddOns\\BobUI\\media\\buttons\\RaidPanel-Toggle")
--This is how you skin the default raid frames
f = CreateFrame("Frame")
f:SetScript("OnEvent", function(self, event, ...)
if event == "GROUP_ROSTER_UPDATE" then
for i = 1, 5 do -- Party Frames
_G["CompactPartyFrameMember" .. i]:CreateBeautyBorder(12)
end
for i = 1, 80 do -- Raid Frames, do we really have 80 of them? Don't remember
_G["CompactRaidFrame" .. i]:CreateBeautyBorder(12)
end
for i = 1, 5 do -- Raid Frames Group 1
_G["CompactRaidGroup1Member" .. i]:CreateBeautyBorder(12)
end
for i = 1, 5 do -- Raid Frames Group 2
_G["CompactRaidGroup2Member" .. i]:CreateBeautyBorder(12)
end
for i = 1, 5 do -- Raid Frames Group 3
_G["CompactRaidGroup3Member" .. i]:CreateBeautyBorder(12)
end
for i = 1, 5 do -- Raid Frames Group 5
_G["CompactRaidGroup4Member" .. i]:CreateBeautyBorder(12)
end
for i = 1, 5 do -- Raid Frames Group 6
_G["CompactRaidGroup5Member" .. i]:CreateBeautyBorder(12)
end
--Set the default raid frame options to how we want them
--apparently doesn't work?
SetCVar("useCompactPartyFrames", 1)
SetCVar("raidOptionShowBorders", 0)
SetCVar("raidFramesDisplayPowerBars", 1)
SetCVar("raidFramesDisplayClassColor", 1)
end
end)
f:RegisterEvent("PLAYER_LOGIN")
f:RegisterEvent("GROUP_ROSTER_UPDATE")
f:RegisterEvent("ADDON_LOADED")