Originally Posted by 10leej
... figure out how to test arena/boss frames to make sure they work like I want them to ...
|
Here is (basically; there are a few drycoded adjustments) what I use to test those frames:
Code:
local groups = { -- Change these to the global names your layout will make.
arena = { "oUFPhanxArena1", "oUFPhanxArena2", "oUFPhanxArena3", "oUFPhanxArena4", "oUFPhanxArena5", "oUFPhanxArenaPet1", "oUFPhanxArena2", "oUFPhanxArenaPet3", "oUFPhanxArenaPet4", "oUFPhanxArenaPet5" },
boss = { "oUFPhanxBoss1", "oUFPhanxBoss2", "oUFPhanxBoss3", "oUFPhanxBoss4", "oUFPhanxBoss5" },
}
local function toggle(f)
if f.__realunit then
f:SetAttribute("unit", f.__realunit)
f.unit = f.__realunit
f.__realunit = nil
f:Hide()
else
f.__realunit = f:GetAttribute("unit") or f.unit
f:SetAttribute("unit", "player")
f.unit = "player"
f:Show()
end
end
SLASH_OUFPHANXTEST1 = "/otest"
SlashCmdList.OUFPHANXTEST = function(group)
local frames = groups[strlower(strtrim(group))]
if not frames then return end
for i = 1, #frames do
local frame = _G[frames[i]]
if frame then
toggle(frame)
end
end
end
Usage: "/otest boss" or "/otest arena"