Loading...

AddOnSkins: How to Add, Remove or Replace Skins.

1
Let's say you love my skin but you just want to make an adjustment to the color here is how you do it.

All skins in AddOnSkins are Priority 1 by default.

Add to using priority system.

Code: Select all

local AS = unpack(AddOnSkins)

if not AS:CheckAddOn('BuyEmAll') then return end

function AS:BuyEmAllColor()
	BuyEmAllFrame:SetBackdropColor(1, 1, 1, .16)
end

AS:RegisterSkin('BuyEmAll', AS.BuyEmAllColor, 2, '[AddonLoader]')
Let's say you just want the skin to be in your edit and not go through AddOnSkins.

Removing: (While frowned upon. It's possible.)

Code: Select all

if AddOnSkins then
	AddOnSkins[1]:UnregisterSkin('BuyEmAll')
end
Let's say you want a custom skin and keep it running through AddOnSkins. Just replace the function and it will do the rest.

Replace:

Code: Select all

local AS = unpack(AddOnSkins)

if not AS:CheckAddOn('BuyEmAll') then return end

function AS:BuyEmAllColor()
	BuyEmAllFrame:SetBackdropColor(1, 1, 1, .16)
end