Several years ago I bought a couple of “How To Make WoW Add-Ons” textbooks and I made a simple addon to edit the color behind the target and focus frame name to match their class. Yesterday when the prepatch came out my add-on stopped working I assume because some of the LUA code was renamed. My code can be found below. My question is where can I locate official documentation for the WoW UI so I can find the correct names of the fields I want to edit?
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
end
frame:SetScript("OnEvent", eventHandler)
for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
BarTextures:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
end
I want to edit the health bar of my player, target, and focus frames to match the corresponding class color. and I want to edit the name bar on the target and focus frames to either color-match the class or set the opacity to match the player name bar.
I’m not 100% sure what the problem is. I believe TargetFrameNameBackground has been changed or renamed and I just can’t find out what it’s been changed to.