Alright. But where should I be putting that hooksecurefunc? I've tried adding it to the SkinGrid addon but can't get it to work.
Here's how the code looks now, but it doesn't do anything since I don't have anything in the Grid_AddBorder funcion. If you could point out where to add it that would be awesome
lua Code:
local function SkinGrid()
local GridFrame = Grid and Grid:GetModule("GridFrame")
if GridFrame and GridFrame.registeredFrames then
-- print("Adding borders to Grid frames")
local function Grid_AddBorder(f)
end
local o = GridFrame.RegisterFrame
GridFrame.RegisterFrame = function(self, f)
o(self, f)
Grid_AddBorder(f)
end
return true
end
end
if not SkinGrid() then
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:RegisterEvent("PLAYER_LOGIN")
f:SetScript("OnEvent", function()
if SkinGrid() then
f:UnregisterAllEvents()
f:SetScript("OnEvent", nil)
SkinGrid = nil
end
end)
end