/Tukui/modules/skins/tradeskill.lua
http://github.com/Asphyxia/Tukui · Lua · 89 lines · 74 code · 14 blank · 1 comment · 6 complexity · 443d8e9d4a5c60d02827eeb132908a10 MD5 · raw file
- local T, C, L = unpack(select(2, ...))
- local function LoadSkin()
- TradeSkillFrame:StripTextures(true)
- TradeSkillListScrollFrame:StripTextures()
- TradeSkillDetailScrollFrame:StripTextures()
- TradeSkillFrameInset:StripTextures()
- TradeSkillExpandButtonFrame:StripTextures()
- TradeSkillDetailScrollChildFrame:StripTextures()
-
- TradeSkillFrame:SetTemplate("Transparent")
- TradeSkillFrame:CreateShadow("Transparent")
- TradeSkillFrame:Height(TradeSkillFrame:GetHeight() + 12)
- TradeSkillRankFrame:StripTextures()
- TradeSkillRankFrame:CreateBackdrop("Transparent")
- TradeSkillRankFrame:SetStatusBarTexture(C["media"].normTex)
-
- T.SkinButton(TradeSkillCreateButton, true)
- T.SkinButton(TradeSkillCancelButton, true)
- T.SkinButton(TradeSkillFilterButton, true)
- T.SkinButton(TradeSkillCreateAllButton, true)
- T.SkinButton(TradeSkillViewGuildCraftersButton, true)
-
- TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.37, 0.75)
- TradeSkillLinkButton:GetPushedTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8)
- TradeSkillLinkButton:GetHighlightTexture():Kill()
- TradeSkillLinkButton:CreateBackdrop("Transparent")
- TradeSkillLinkButton:Size(17, 14)
- TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1)
- T.SkinEditBox(TradeSkillFrameSearchBox)
- T.SkinEditBox(TradeSkillInputBox)
- T.SkinNextPrevButton(TradeSkillDecrementButton)
- T.SkinNextPrevButton(TradeSkillIncrementButton)
- TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0)
-
- T.SkinCloseButton(TradeSkillFrameCloseButton)
-
- local once = false
- hooksecurefunc("TradeSkillFrame_SetSelection", function(id)
- TradeSkillSkillIcon:StyleButton()
- if TradeSkillSkillIcon:GetNormalTexture() then
- TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(.08, .92, .08, .92)
- TradeSkillSkillIcon:GetNormalTexture():ClearAllPoints()
- TradeSkillSkillIcon:GetNormalTexture():Point("TOPLEFT", 2, -2)
- TradeSkillSkillIcon:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2)
- end
- TradeSkillSkillIcon:SetTemplate("Transparent")
- for i=1, MAX_TRADE_SKILL_REAGENTS do
- local button = _G["TradeSkillReagent"..i]
- local icon = _G["TradeSkillReagent"..i.."IconTexture"]
- local count = _G["TradeSkillReagent"..i.."Count"]
-
- icon:SetTexCoord(.08, .92, .08, .92)
- icon:SetDrawLayer("OVERLAY")
- if not icon.backdrop then
- icon.backdrop = CreateFrame("Frame", nil, button)
- icon.backdrop:SetFrameLevel(button:GetFrameLevel() - 1)
- icon.backdrop:SetTemplate("Transparent")
- icon.backdrop:Point("TOPLEFT", icon, "TOPLEFT", -2, 2)
- icon.backdrop:Point("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 2, -2)
- end
-
- icon:SetParent(icon.backdrop)
- count:SetParent(icon.backdrop)
- count:SetDrawLayer("OVERLAY")
-
- if i > 2 and once == false then
- local point, anchoredto, point2, x, y = button:GetPoint()
- button:ClearAllPoints()
- button:Point(point, anchoredto, point2, x, y - 3)
- once = true
- end
-
- _G["TradeSkillReagent"..i.."NameFrame"]:Kill()
- end
- end)
-
-
- --Guild Crafters
- TradeSkillGuildFrame:StripTextures()
- TradeSkillGuildFrame:SetTemplate("Transparent")
- TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19)
- TradeSkillGuildFrameContainer:StripTextures()
- TradeSkillGuildFrameContainer:SetTemplate("Transparent")
- T.SkinCloseButton(TradeSkillGuildFrameCloseButton)
- end
- T.SkinFuncs["Blizzard_TradeSkillUI"] = LoadSkin