View Single Post
03-31-17, 05:03 AM   #2
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
It's better to use hooksecurefunc, there are two parts :

Hook the BuffButton_OnLoad, so you'll apply your skin to every aura button, you also need to hook each button's SetTexture method, so when blz set texture to those buttons, you can do the cut job :

Code:
hooksecurefunc("BuffButton_OnLoad", function(self)
    -- the self is aura button
    hooksecurefunc(self, "SetTexture", function(self, path)
	if path then
                -- Cut the icon
		self:SetTexCoord(0.06, 0.94, 0.06, 0.94)
	end
    end)

    -- do other skin job
end)
  Reply With Quote