This commit is contained in:
Bunny67
2017-12-16 21:24:38 +03:00
parent 33f78eb057
commit e9b907b7f5
4 changed files with 30 additions and 45 deletions
@@ -97,7 +97,7 @@ local function LoadSkin()
button = _G["BankFrameItem"..i]
buttonIcon = _G["BankFrameItem"..i.."IconTexture"]
button:SetNormalTexture(nil)
button:SetNormalTexture("")
E:SetTemplate(button, "Default", true)
E:StyleButton(button)
@@ -116,7 +116,7 @@ local function LoadSkin()
button = _G["BankFrameBag"..i]
buttonIcon = _G["BankFrameBag"..i.."IconTexture"]
button:SetNormalTexture(nil)
button:SetNormalTexture("")
E:SetTemplate(button, "Default", true)
E:StyleButton(button)
@@ -20,8 +20,8 @@ local function LoadSkin()
for i = 1, 3 do
local tab = _G["SpellBookFrameTabButton"..i]
tab:GetNormalTexture():SetTexture(nil)
tab:GetDisabledTexture():SetTexture(nil)
tab:GetNormalTexture():SetTexture("")
tab:GetDisabledTexture():SetTexture("")
S:HandleTab(tab)
@@ -40,8 +40,9 @@ local function LoadSkin()
local cooldown = _G["SpellButton"..i.."Cooldown"]
button:DisableDrawLayer("BACKGROUND")
button:GetNormalTexture():SetTexture(nil)
button:GetPushedTexture():SetTexture(nil)
button:GetNormalTexture():SetTexture("")
button:GetPushedTexture():SetTexture("")
--E:StyleButton(button, true)
if iconTexture then
iconTexture:SetTexCoord(unpack(E.TexCoords))
@@ -7,6 +7,7 @@ local _G = _G
local unpack = unpack
local select = select
local find = string.find
local match = string.match
local split = string.split
--WoW API / Variables
local GetItemInfo = GetItemInfo
@@ -49,7 +50,7 @@ local function LoadSkin()
TradeSkillCollapseAllButton.Text:SetText("+")
hooksecurefunc(TradeSkillCollapseAllButton, "SetNormalTexture", function(self, texture)
if(find(texture, "MinusButton")) then
if find(texture, "MinusButton") then
self.Text:SetText("-")
else
self.Text:SetText("+")
@@ -136,8 +137,10 @@ local function LoadSkin()
hooksecurefunc("TradeSkillFrame_SetSelection", function(id)
E:SetTemplate(TradeSkillSkillIcon, "Default", true)
E:StyleButton(TradeSkillSkillIcon, nil, true)
if TradeSkillSkillIcon:GetNormalTexture() then
TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(unpack(E.TexCoords))
E:SetInside(TradeSkillSkillIcon:GetNormalTexture())
end
TradeSkillSkillIcon:SetWidth(40)
TradeSkillSkillIcon:SetHeight(40)
@@ -145,11 +148,8 @@ local function LoadSkin()
local skillLink = GetTradeSkillItemLink(id)
if skillLink then
TradeSkillRequirementLabel:SetTextColor(1, 0.80, 0.10)
local skillString = select(3, find(skillLink, "|H(.+)|h"))
local skillID = select(2, split(":", skillString))
local quality = select(3, GetItemInfo(skillID))
if quality and quality > 1 then
local _, _, quality = GetItemInfo(match(skillLink, "item:(%d+)"))
if quality then
TradeSkillSkillIcon:SetBackdropBorderColor(GetItemQualityColor(quality))
TradeSkillSkillName:SetTextColor(GetItemQualityColor(quality))
else
@@ -166,10 +166,8 @@ local function LoadSkin()
local name = _G["TradeSkillReagent"..i.."Name"]
if reagentLink then
local reagentString = select(3, find(reagentLink, "|H(.+)|h"))
local reagentID = select(2, split(":", reagentString))
local quality = select(3, GetItemInfo(reagentID))
if quality and quality > 1 then
local _, _, quality = GetItemInfo(match(reagentLink, "item:(%d+)"))
if quality then
icon.backdrop:SetBackdropBorderColor(GetItemQualityColor(quality))
if playerReagentCount < reagentCount then
name:SetTextColor(0.5, 0.5, 0.5)
+1 -15
View File
@@ -156,21 +156,7 @@ function S:HandleTab(tab)
end
function S:HandleNextPrevButton(btn, buttonOverride)
local inverseDirection
if btn:GetName() then
for k in string.gfind(lower(btn:GetName()), "left") do
inverseDirection = k
end
for k in string.gfind(lower(btn:GetName()), "prev") do
inverseDirection = k
end
for k in string.gfind(lower(btn:GetName()), "decrement") do
inverseDirection = k
end
for k in string.gfind(lower(btn:GetName()), "promote") do
inverseDirection = k
end
end
local inverseDirection = btn:GetName() and (find(lower(btn:GetName()), "left") or find(lower(btn:GetName()), "prev") or find(lower(btn:GetName()), "decrement") or find(lower(btn:GetName()), "promote"))
E:StripTextures(btn)
btn:SetNormalTexture(nil)