Commit df0b7d58 authored by Azilroka's avatar Azilroka

Blizzard Skin Cleanup

parent 60da1d4d
......@@ -49,22 +49,19 @@ function AS:Blizzard_Talent(event, addon)
AS:SkinTexture(Button.specIcon)
Button:SetHighlightTexture(nil)
Button.specIcon.border = CreateFrame("Frame", nil, Button)
Button.specIcon.border:SetOutside(Button.specIcon)
AS:SetTemplate(Button.specIcon.border)
Button.specIcon.border:SetBackdropColor(0, 0, 0, 0)
AS:CreateBackdrop(Button.specIcon)
Button:HookScript('OnEnter', function(self)
self.Backdrop:SetBackdropBorderColor(1, .82, 0)
self.specIcon.border:SetBackdropBorderColor(1, .82, 0)
self.specIcon.Backdrop:SetBackdropBorderColor(1, .82, 0)
end)
Button:HookScript('OnLeave', function(self)
if self.selected then
self.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
self.specIcon.border:SetBackdropBorderColor(unpack(AS.Color))
self.specIcon.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
self.specIcon.border:SetBackdropBorderColor(unpack(AS.BorderColor))
self.specIcon.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
end)
end
......@@ -103,10 +100,10 @@ function AS:Blizzard_Talent(event, addon)
local Button = self['specButton'..i]
if Button.selected then
Button.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
Button.specIcon.border:SetBackdropBorderColor(unpack(AS.Color))
Button.specIcon.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
Button.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
Button.specIcon.border:SetBackdropBorderColor(unpack(AS.BorderColor))
Button.specIcon.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
end
......@@ -120,14 +117,11 @@ function AS:Blizzard_Talent(event, addon)
frame.icon:SetTexture(spellTex)
end
if not frame.Backdrop then
AS:CreateBackdrop(frame)
frame.Backdrop:SetOutside(frame.icon)
frame.ring:Hide()
AS:SkinTexture(frame.icon)
frame.icon:SetSize(40, 40)
end
AS:CreateBackdrop(frame.icon)
AS:SkinTexture(frame.icon)
frame.ring:Hide()
frame.icon:SetSize(40, 40)
frame.subText:SetTextColor(1, 1, 0)
end
......@@ -149,7 +143,9 @@ function AS:Blizzard_Talent(event, addon)
AS:SkinBackdropFrame(Button)
AS:CreateShadow(Button.Backdrop, true)
Button.Backdrop.Shadow:SetBackdropBorderColor(unpack(AS.Color))
Button.GlowFrame.TopGlowLine = Button.Backdrop.Shadow
Button.GlowFrame.TopGlowLine:Hide()
Button.GlowFrame.BottomGlowLine:Kill()
......@@ -161,25 +157,26 @@ function AS:Blizzard_Talent(event, addon)
Button.Backdrop:SetPoint("TOPLEFT", 15, -1)
Button.Backdrop:SetPoint("BOTTOMRIGHT", -10, 1)
Button.Border = CreateFrame("Frame", nil, Button)
AS:SkinFrame(Button.Border)
Button.knownSelection:SetAlpha(0)
Button.Border:SetBackdropColor(0, 0, 0, 0)
Button.Border:SetOutside(Button.icon)
AS:CreateBackdrop(Button.icon)
AS:SkinTexture(Button.icon)
Button.icon:SetSize(32, 32)
Button.icon:SetDrawLayer("ARTWORK")
AS:SkinTexture(Button.icon)
Button:HookScript('OnEnter', function(self)
self.Backdrop:SetBackdropBorderColor(1, .82, 0)
self.Border:SetBackdropBorderColor(1, .82, 0)
self.icon.Backdrop:SetBackdropBorderColor(1, .82, 0)
end)
Button:HookScript('OnLeave', function(self)
if self.knownSelection:IsShown() then
self.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
self.Border:SetBackdropBorderColor(unpack(AS.Color))
self.icon.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
self.Border:SetBackdropBorderColor(unpack(AS.BorderColor))
self.icon.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
end)
end
......@@ -191,10 +188,10 @@ function AS:Blizzard_Talent(event, addon)
local Talent = self['tier'..i]['talent'..j]
if Talent.knownSelection:IsShown() then
Talent.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
Talent.Border:SetBackdropBorderColor(unpack(AS.Color))
Talent.icon.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
Talent.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
Talent.Border:SetBackdropBorderColor(unpack(AS.BorderColor))
Talent.icon.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
end
end
......@@ -204,8 +201,7 @@ function AS:Blizzard_Talent(event, addon)
AS:StripTextures(PvpTalentFrame)
for _, Button in pairs(PvpTalentFrame.Slots) do
AS:CreateBackdrop(Button)
Button.Backdrop:SetOutside(Button.Texture)
AS:CreateBackdrop(Button.Texture)
Button.Arrow:SetAlpha(0)
Button.Border:Hide()
......@@ -220,16 +216,16 @@ function AS:Blizzard_Talent(event, addon)
AS:SkinTexture(self.Texture)
if (not slotInfo.selectedTalentID) then
self.Texture:SetTexture([[Interface\Icons\INV_Misc_QuestionMark]])
self.Backdrop:SetBackdropBorderColor(1, 1, 0, 1)
self.Texture.Backdrop:SetBackdropBorderColor(1, 1, 0, 1)
else
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
self.Texture.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
else
self.Texture:SetTexture([[Interface\PetBattles\PetBattle-LockIcon]])
self.Texture:SetTexCoord(0, 1, 0, 1)
self.Texture:SetDesaturated(true)
self.Texture:Show()
self.Backdrop:SetBackdropBorderColor(1, 0, 0, 1)
self.Texture.Backdrop:SetBackdropBorderColor(1, 0, 0, 1)
end
end)
end
......
......@@ -2,6 +2,8 @@ local AS = unpack(AddOnSkins)
function AS:Blizzard_TimeManager(event, addon)
if addon == "Blizzard_TimeManager" or IsAddOnLoaded('Blizzard_TimeManager') then
AS:UnregisterSkinEvent('Blizzard_TimeManager', 'ADDON_LOADED')
AS:SkinFrame(TimeManagerFrame)
AS:StripTextures(TimeManagerFrameInset)
......@@ -32,12 +34,13 @@ function AS:Blizzard_TimeManager(event, addon)
AS:StripTextures(StopwatchTabFrame)
AS:SkinCloseButton(StopwatchCloseButton)
AS:SkinNextPrevButton(StopwatchPlayPauseButton)
AS:SkinNextPrevButton(StopwatchResetButton)
StopwatchPlayPauseButton:SetPoint("RIGHT", StopwatchResetButton, "LEFT", -4, 0)
StopwatchResetButton:SetPoint("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6)
AS:UnregisterSkinEvent('Blizzard_TimeManager', 'ADDON_LOADED')
end
end
AS:RegisterSkin("Blizzard_TimeManager", AS.Blizzard_TimeManager)
\ No newline at end of file
AS:RegisterSkin("Blizzard_TimeManager", AS.Blizzard_TimeManager)
......@@ -31,7 +31,6 @@ function AS:Blizzard_TradeSkill(event, addon)
AS:StripTextures(TradeSkillFrame.RecipeList.UnlearnedTab)
AS:SkinScrollBar(TradeSkillFrame)
AS:SkinScrollBar(TradeSkillFrame.RecipeList.scrollBar)
AS:StripTextures(TradeSkillFrame.DetailsFrame)
......@@ -59,25 +58,20 @@ function AS:Blizzard_TradeSkill(event, addon)
hooksecurefunc(TradeSkillFrame.DetailsFrame, "RefreshDisplay", function(self)
AS:StyleButton(self.Contents.ResultIcon)
AS:SetTemplate(self.Contents.ResultIcon)
if self.Contents.ResultIcon:GetNormalTexture() then
AS:SkinTexture(self.Contents.ResultIcon:GetNormalTexture())
self.Contents.ResultIcon:GetNormalTexture():SetInside()
end
self.Contents.ResultIcon.ResultBorder:SetTexture("")
self.Contents.ResultIcon.IconBorder:SetTexture("")
AS:SetTemplate(self.Contents.ResultIcon)
self.Contents.ResultIcon:SetBackdropBorderColor(self.Contents.ResultIcon.IconBorder:GetVertexColor())
for _, Button in pairs(self.Contents.Reagents) do
if not Button.Icon.Backdrop then
Button.Icon.Backdrop = CreateFrame("Frame", nil, Button)
Button.Icon.Backdrop:SetFrameLevel(Button:GetFrameLevel() - 1)
AS:SetTemplate(Button.Icon.Backdrop)
Button.Icon.Backdrop:SetOutside(Button.Icon)
end
AS:CreateBackdrop(Button.Icon)
AS:SkinTexture(Button.Icon)
Button.NameFrame:SetTexture("")
end
end)
......
......@@ -43,7 +43,7 @@ function AS:Blizzard_VoidStorage(event, addon)
Button.icon:SetInside()
Button.IconBorder:SetAlpha(0)
hooksecurefunc(Button.IconBorder, 'SetVertexColor', function(self, r, g, b) Button:SetBackdropBorderColor(r, g, b) end)
hooksecurefunc(Button.IconBorder, 'Hide', function(self, r, g, b) Button:SetBackdropBorderColor(unpack(AS.BorderColor)) end)
hooksecurefunc(Button.IconBorder, 'Hide', function(self) Button:SetBackdropBorderColor(unpack(AS.BorderColor)) end)
end
end
......
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