Commit 88b78cfd authored by Azilroka's avatar Azilroka
Browse files

LinkWrangler

parent 5bc22026
......@@ -3,38 +3,32 @@ local AS = unpack(AddOnSkins)
if not AS:CheckAddOn('LinkWrangler') then return end
function AS:LinkWrangler()
local Path = "Interface\\AddOns\\AddOnSkins\\Skins\\Buttons\\"
local Path = [[Interface\AddOns\AddOnSkins\Media\Textures\Buttons\]]
local function LWSkin_SkinButton(button, tex, distex)
if (button == nil) then
return
end
if not button then return end
button:SetNormalTexture(tex)
button:SetDisabledTexture(distex)
button:SetPushedTexture(tex)
button:SetHighlightTexture(tex)
return button
end
local function LWSkin(frame, link)
local r, g, b = 1, 1, 0
if GetItemInfo(link) then
local quality = select(3, GetItemInfo(link))
r, g, b = GetItemQualityColor(tonumber(quality))
end
AS:SetTemplate(frame, 'Default')
frame:SetBackdropBorderColor(r,g,b)
if frame.isSkinned then return end
local framename = frame:GetName()
LWSkin_SkinButton(_G[framename.."CloseButton"], Path.."close")
LWSkin_SkinButton(_G[framename.."MinButton"], Path.."min")
LWSkin_SkinButton(_G[framename.."CompButton"], Path.."compare", Path.."compareDisable")
LWSkin_SkinButton(_G[framename.."WhisperButton"], Path.."whisper")
LWSkin_SkinButton(_G[framename.."RelinkButton"], Path.."relink")
LWSkin_SkinButton(_G[framename.."DressupButton"], Path.."dress")
LWSkin_SkinButton(_G[framename.."CaptureButton"], Path.."compare")
frame.isSkinned = true
end
LinkWrangler.RegisterCallback("LinkWrangler_Skin", LWSkin, "show", "showcomp")
end
AS:RegisterSkin('LinkWrangler', AS.LinkWrangler)
\ No newline at end of file
AS:RegisterSkin('LinkWrangler', AS.LinkWrangler)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment