A long time ago I made a custom addon to modify the default unit frames by increasing the frame scaling and changing the color of the name bar to match the class color on my target and focus frame. I’m testing my add-on on the PTR and my scaling is working but my target and focus frames are being converted to the current retail style frames.
local frame = CreateFrame(“FRAME”)
frame:RegisterEvent(“GROUP_ROSTER_UPDATE”)
frame:RegisterEvent(“PLAYER_TARGET_CHANGED”)
frame:RegisterEvent(“PLAYER_FOCUS_CHANGED”)
frame:RegisterEvent(“UNIT_FACTION”)local function eventHandler(self, event, …)
if UnitIsPlayer(“target”) then
c = RAID_CLASS_COLORS[select(2, UnitClass(“target”))]
TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
end
if UnitIsPlayer(“focus”) then
c = RAID_CLASS_COLORS[select(2, UnitClass(“focus”))]
FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
end
endframe:SetScript(“OnEvent”, eventHandler)
for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
BarTextures:SetTexture(“Interface\TargetingFrame\UI-StatusBar”)
end
I think the issue is this line and maybe NameBackground doesn’t exist anymore and it’s auto converting to old-style frames?
TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
Is there a place where I can see the docs for the new frames or does anyone have a solution? If I can’t change the name bar because it’s transparent now can I do the health bar instead?