Commit bfb11fd4 authored by Azilroka's avatar Azilroka
Browse files

4.45

parent 88b78cfd
## Interface: 80300
## Interface: 90001
## Title: |cff16C3F2AddOn|r|cFFFFFFFFSkins|r
## Version: 4.44
## Version: 4.45
## Author: Azilroka, NihilisticPandemonium
## SavedVariables: AddOnSkinsDB, AddOnSkinsDS
## OptionalDeps: ElvUI
......
......@@ -59,6 +59,7 @@ AS.Blizzard.Tooltip = {
AS.RegisterTemplates = {}
--[[
-- ls, Azil, and Simpy made this to replace Blizzard's SetBackdrop API while the textures can't snap
AS.PixelBorders = {'TOP', 'BOTTOM', 'LEFT', 'RIGHT'}
function AS:SetBackdrop(frame, bgFile, edgeSize, insetLeft, insetRight, insetTop, insetBottom)
......@@ -153,6 +154,10 @@ function AS:BuildPixelBorders(frame, noSecureHook)
frame.pixelBorders = borders
end
end
]]
local invertedShadow = { bgFile = [[Interface\AddOns\AddOnSkins\Media\Textures\InvertedShadow]] }
local shadow = { edgeFile = [[Interface\AddOns\AddOnSkins\Media\Textures\Shadows]], edgeSize = 3 }
function AS:UpdateSettings()
for Frame in pairs(AS.RegisterTemplates) do
......@@ -240,8 +245,7 @@ function AS:CreateBackdrop(Frame, Template, Texture)
local Parent = Frame.IsObjectType and Frame:IsObjectType('Texture') and Frame:GetParent() or Frame
local Backdrop = CreateFrame('Frame', nil, Parent)
if not Backdrop.SetBackdrop then Mixin(Backdrop, BackdropTemplateMixin) end
local Backdrop = CreateFrame('Frame', nil, Parent, 'BackdropTemplate')
AS:SetOutside(Backdrop, Frame)
AS:SetTemplate(Backdrop, Template, Texture)
......@@ -257,18 +261,17 @@ end
function AS:CreateShadow(Frame, NoRegister, Inverted)
if (not AS:CheckOption('Shadows')) or Frame.Shadow then return end
local Shadow = CreateFrame('Frame', nil, Frame)
if not Shadow.SetBackdrop then Mixin(Shadow, BackdropTemplateMixin) end
local Shadow = CreateFrame('Frame', nil, Frame, 'BackdropTemplate')
Shadow:SetFrameStrata(Frame:GetFrameStrata())
local FrameLevel = Frame:GetFrameLevel() > 1 and Frame:GetFrameLevel() or 1
if Inverted then
Shadow:SetBackdrop({ bgFile = [[Interface\AddOns\AddOnSkins\Media\Textures\InvertedShadow]] })
Shadow:SetBackdrop(invertedShadow)
Shadow:SetFrameLevel(FrameLevel + 1)
AS:SetInside(Shadow, Frame)
else
Shadow:SetBackdrop({ edgeFile = [[Interface\AddOns\AddOnSkins\Media\Textures\Shadows]], edgeSize = 3 })
Shadow:SetBackdrop(shadow)
Shadow:SetFrameLevel(FrameLevel)
AS:SetOutside(Shadow, Frame)
end
......@@ -307,6 +310,10 @@ function AS:GradientHighlight(frame, layer, color)
rightGrad:SetGradientAlpha("Horizontal", r, g, b, 0, r, g, b, 0.35)
end
local function Desaturate(self, value)
if value ~= true then self:SetDesaturated(true) end
end
function AS:Desaturate(frame)
if frame.GetNumRegions then
for i = 1, frame:GetNumRegions() do
......@@ -328,17 +335,17 @@ function AS:Desaturate(frame)
if Normal then
Normal:SetDesaturated(true)
hooksecurefunc(Normal, 'SetDesaturated', function(self, value) if value ~= true then self:SetDesaturated(true) end end)
hooksecurefunc(Normal, 'SetDesaturated', Desaturate)
end
if Pushed then
Pushed:SetDesaturated(true)
hooksecurefunc(Pushed, 'SetDesaturated', function(self, value) if value ~= true then self:SetDesaturated(true) end end)
hooksecurefunc(Pushed, 'SetDesaturated', Desaturate)
end
if Highlight then
Highlight:SetDesaturated(true)
hooksecurefunc(Highlight, 'SetDesaturated', function(self, value) if value ~= true then self:SetDesaturated(true) end end)
hooksecurefunc(Highlight, 'SetDesaturated', Desaturate)
end
end
end
......@@ -352,37 +359,37 @@ function AS:SetTemplate(Frame, Template, Texture)
if AS:CheckOption('ElvUIStyle', 'ElvUI') then
if Frame:IsObjectType("Button") then
Texture = ElvUI[1].media.glossTex
Texture = _G.ElvUI[1].media.glossTex
else
Texture = ElvUI[1].media.blankTex
Texture = _G.ElvUI[1].media.blankTex
end
if Template == 'Default' then
R, G, B = unpack(ElvUI[1].media.backdropcolor)
AS.BackdropColor = ElvUI[1].media.backdropcolor
R, G, B = unpack(_G.ElvUI[1].media.backdropcolor)
AS.BackdropColor = _G.ElvUI[1].media.backdropcolor
else
R, G, B, Alpha = unpack(ElvUI[1].media.backdropfadecolor)
AS.BackdropColor = ElvUI[1].media.backdropfadecolor
R, G, B, Alpha = unpack(_G.ElvUI[1].media.backdropfadecolor)
AS.BackdropColor = _G.ElvUI[1].media.backdropfadecolor
end
Frame.template = Template or 'Default'
ElvUI[1].frames[Frame] = true
_G.ElvUI[1].frames[Frame] = true
end
if not Frame.SetBackdrop then Mixin(Frame, BackdropTemplateMixin) end
Frame:SetBackdrop(nil)
if not Frame.SetBackdrop then _G.Mixin(Frame, _G.BackdropTemplateMixin) end
Frame:SetBackdrop({ edgeFile = AS.Blank, bgFile = Texture, edgeSize = 1 })
AS:BuildPixelBorders(Frame)
--AS:BuildPixelBorders(Frame)
--AS:SetBackdrop(frame, bgFile, edgeSize, insetLeft, insetRight, insetTop, insetBottom)
AS:SetBackdrop(Frame, Texture, (AS:CheckOption('Theme') == 'TwoPixel' and AS.Mult*2 or AS.Mult))
--AS:SetBackdrop(Frame, Texture, (AS:CheckOption('Theme') == 'TwoPixel' and AS.Mult*2 or AS.Mult))
if AS:CheckOption('Theme') == 'ThickBorder' or AS:CheckOption('Theme') == 'TwoPixel' then
for _, Inset in pairs({ 'InsideBorder', 'OutsideBorder' }) do
Frame[Inset] = CreateFrame('Frame', nil, Frame)
AS:BuildPixelBorders(Frame[Inset], true)
AS:SetBackdrop(Frame[Inset], nil, AS.Mult)
AS:SetBackdropBorderColor(Frame[Inset], 0, 0, 0, 1)
Frame[Inset]:SetBackdrop({ edgeFile = AS.Blank, bgFile = Texture, edgeSize = 1 })
Frame[Inset]:SetBackdropBorderColor(0, 0, 0, 1)
end
AS:SetInside(Frame.InsideBorder, Frame, AS.Mult, AS.Mult)
......@@ -396,24 +403,24 @@ function AS:SetTemplate(Frame, Template, Texture)
end
if Template == 'NoBackdrop' then
AS:SetBackdropColor(Frame, 0, 0, 0, 0)
Frame:SetBackdropColor(0, 0, 0, 0)
else
AS:SetBackdropColor(Frame, R, G, B, Alpha)
Frame:SetBackdropColor(R, G, B, Alpha)
end
if Template == 'NoBorder' then
AS:SetBackdropBorderColor(Frame, 0, 0, 0, 0)
Frame:SetBackdropBorderColor(0, 0, 0, 0)
else
AS:SetBackdropBorderColor(Frame, unpack(AS.BorderColor))
Frame:SetBackdropBorderColor(unpack(AS.BorderColor))
end
if Template == 'ClassColor' then
AS:SetBackdropBorderColor(Frame, unpack(AS.ClassColor))
Frame:SetBackdropBorderColor(unpack(AS.ClassColor))
end
if Template == 'Custom' then
AS:SetBackdropColor(Frame, unpack(AS:CheckOption('CustomBackdropColor')))
AS:SetBackdropBorderColor(Frame, unpack(AS:CheckOption('CustomBorderColor')))
Frame:SetBackdropColor(unpack(AS:CheckOption('CustomBackdropColor')))
Frame:SetBackdropBorderColor(unpack(AS:CheckOption('CustomBorderColor')))
end
if AS:CheckOption('ElvUIStyle', 'ElvUI') then
......@@ -485,8 +492,8 @@ function AS:SkinArrowButton(object, Arrow)
Pushed:SetVertexColor(unpack(AS.Color))
Pushed:AddMaskTexture(Mask)
Button:HookScript('OnEnter', function(self) self:SetBackdropBorderColor(unpack(AS.Color)) Normal:SetVertexColor(unpack(AS.Color)) end)
Button:HookScript('OnLeave', function(self) self:SetBackdropBorderColor(unpack(AS.BorderColor)) Normal:SetVertexColor(1, 1, 1) end)
Button:HookScript('OnEnter', function(s) s:SetBackdropBorderColor(unpack(AS.Color)) Normal:SetVertexColor(unpack(AS.Color)) end)
Button:HookScript('OnLeave', function(s) s:SetBackdropBorderColor(unpack(AS.BorderColor)) Normal:SetVertexColor(1, 1, 1) end)
end
Button.Mask:SetRotation(AS.ArrowRotation[Arrow])
......
......@@ -11,7 +11,6 @@ function AS:BtWLoadouts()
AS:SkinButton(_G.BtWLoadoutsFrame.ActivateButton)
AS:SkinButton(_G.BtWLoadoutsFrame.DeleteButton)
AS:SkinFrame(_G.BtWLoadoutsFrame.ScrollInset)
AS:SkinFrame(_G.BtWLoadoutsFrame.Profiles.Inset)
AS:SkinEditBox(_G.BtWLoadoutsFrame.Profiles.Name)
......
......@@ -9,7 +9,7 @@ function AS:LinkWrangler()
if not button then return end
button:SetNormalTexture(tex)
button:SetDisabledTexture(distex)
button:SetDisabledTexture(distex or tex)
button:SetPushedTexture(tex)
button:SetHighlightTexture(tex)
end
......@@ -25,6 +25,7 @@ function AS:LinkWrangler()
LWSkin_SkinButton(_G[framename.."WhisperButton"], Path.."whisper")
LWSkin_SkinButton(_G[framename.."RelinkButton"], Path.."relink")
LWSkin_SkinButton(_G[framename.."DressupButton"], Path.."dress")
frame.isSkinned = true
end
......
......@@ -236,7 +236,6 @@ function AS:Blizzard_Character()
AS:SkinCloseButton(_G.ReputationDetailCloseButton)
AS:SkinCheckBox(_G.ReputationDetailAtWarCheckBox)
_G.ReputationDetailAtWarCheckBox:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-SwordCheck")
AS:SkinCheckBox(_G.ReputationDetailLFGBonusReputationCheckBox)
AS:SkinCheckBox(_G.ReputationDetailInactiveCheckBox)
AS:SkinCheckBox(_G.ReputationDetailMainScreenCheckBox)
......
......@@ -22,5 +22,5 @@ function AS:Blizzard_ExtraActionButton()
hooksecurefunc("ExtraActionBar_Update", function() ExtraActionBarFrame.button.style:SetTexture() end)
end
AS:RegisterSkin('Blizzard_AbilityButton', AS.Blizzard_AbilityButton)
AS:RegisterSkin('Blizzard_ExtraActionButton', AS.Blizzard_ExtraActionButton)
--AS:RegisterSkin('Blizzard_AbilityButton', AS.Blizzard_AbilityButton)
--AS:RegisterSkin('Blizzard_ExtraActionButton', AS.Blizzard_ExtraActionButton)
......@@ -49,7 +49,7 @@ function AS:Blizzard_PvE()
AS:SkinTab(PVEFrame['tab'..i])
end
for i = 1, 4 do
for i = 1, 3 do
local Button = GroupFinderFrame["groupButton"..i]
AS:SkinFrame(Button)
......@@ -76,13 +76,12 @@ function AS:Blizzard_PvE()
end)
end
GroupFinderFrameGroupButton1.icon:SetTexture("Interface\\Icons\\INV_Helmet_08")
GroupFinderFrameGroupButton2.icon:SetTexture("Interface\\Icons\\Icon_Scenarios")
GroupFinderFrameGroupButton3.icon:SetTexture("Interface\\Icons\\inv_helmet_06")
GroupFinderFrameGroupButton4.icon:SetTexture("Interface\\Icons\\Achievement_General_StayClassy")
GroupFinderFrameGroupButton1.icon:SetTexture([[Interface\Icons\INV_Helmet_08]])
GroupFinderFrameGroupButton2.icon:SetTexture([[Interface\\Icons\\Icon_Scenarios]])
GroupFinderFrameGroupButton3.icon:SetTexture([[Interface\\Icons\\inv_helmet_06]])
hooksecurefunc('GroupFinderFrame_SelectGroupButton', function()
for i = 1, 4 do
for i = 1, 3 do
local Button = GroupFinderFrame["groupButton"..i]
if GroupFinderFrame.selectionIndex == Button:GetID() then
Button:SetBackdropBorderColor(unpack(AS.Color))
......@@ -129,7 +128,6 @@ function AS:Blizzard_PvE()
end)
AS:SkinScrollBar(LFDQueueFrameRandomScrollFrame.ScrollBar)
AS:SkinButton(LFDQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton)
hooksecurefunc('LFGDungeonReadyDialog_UpdateRewards', function()
for i = 1, LFG_ROLE_NUM_SHORTAGE_TYPES do
......@@ -185,16 +183,6 @@ function AS:Blizzard_PvE()
end
end
AS:StripTextures(ScenarioFinderFrame)
AS:StripTextures(ScenarioFinderFrame.Queue, true)
AS:SkinDropDownBox(ScenarioFinderFrame.Queue.Dropdown)
ScenarioFinderFrame.Queue.Dropdown:SetPoint('TOPLEFT', ScenarioFinderFrame.Queue, 'TOPLEFT', 87, -40)
AS:StripTextures(ScenarioFinderFrame.Queue.Specific.ScrollFrame, true)
AS:SkinScrollBar(ScenarioFinderFrame.Queue.Specific.ScrollFrame.ScrollBar)
AS:SkinButton(ScenarioQueueFrameFindGroupButton, true)
AS:StripTextures(LFGListFrame.CategorySelection.Inset)
AS:SkinButton(LFGListFrame.CategorySelection.StartGroupButton, true)
AS:SkinButton(LFGListFrame.CategorySelection.FindGroupButton, true)
......
......@@ -56,25 +56,25 @@ function AS:Blizzard_Gossip()
else
local r, g, b = unpack(AS.ClassColor)
for i = 1, NUMGOSSIPBUTTONS do
_G["GossipTitleButton"..i]:GetFontString():SetTextColor(1, 1, 1)
_G["GossipTitleButton"..i]:GetHighlightTexture():SetColorTexture(r, g, b, .3)
AS:SetInside(_G["GossipTitleButton"..i]:GetHighlightTexture(), _G["GossipTitleButton"..i], 2, 0)
end
GossipGreetingText:SetTextColor(1, 1, 1)
hooksecurefunc("GossipFrameUpdate", function()
for i = 1, NUMGOSSIPBUTTONS do
local button = _G["GossipTitleButton"..i]
if button:GetFontString() then
local Text = button:GetFontString():GetText()
if Text and Text.GetText and strmatch(Text:GetText(), '|c[Ff][Ff]%x%x%x%x%x%x') then
button:GetFontString():SetText(gsub(Text, '|c[Ff][Ff]%x%x%x%x%x%x', '|cffffe519'))
end
end
end
end)
--for i = 1, NUMGOSSIPBUTTONS do
-- _G["GossipTitleButton"..i]:GetFontString():SetTextColor(1, 1, 1)
-- _G["GossipTitleButton"..i]:GetHighlightTexture():SetColorTexture(r, g, b, .3)
-- AS:SetInside(_G["GossipTitleButton"..i]:GetHighlightTexture(), _G["GossipTitleButton"..i], 2, 0)
--end
--GossipGreetingText:SetTextColor(1, 1, 1)
--hooksecurefunc("GossipFrameUpdate", function()
-- for i = 1, NUMGOSSIPBUTTONS do
-- local button = _G["GossipTitleButton"..i]
-- if button:GetFontString() then
-- local Text = button:GetFontString():GetText()
-- if Text and Text.GetText and strmatch(Text:GetText(), '|c[Ff][Ff]%x%x%x%x%x%x') then
-- button:GetFontString():SetText(gsub(Text, '|c[Ff][Ff]%x%x%x%x%x%x', '|cffffe519'))
-- end
-- end
-- end
--end)
end
AS:SkinStatusBar(NPCFriendshipStatusBar)
......@@ -455,14 +455,12 @@ function AS:Blizzard_WorldMap()
AS:StripTextures(QuestMapFrame.DetailsFrame.CompleteQuestFrame)
AS:SetTemplate(QuestMapFrame.QuestsFrame.StoryTooltip, "Transparent")
AS:SetTemplate(QuestScrollFrame.WarCampaignTooltip, "Transparent")
AS:SkinBackdropFrame(QuestScrollFrame.DetailFrame)
QuestScrollFrame.Contents.Separator.Divider:Hide()
QuestScrollFrame.DetailFrame.Backdrop:SetFrameLevel(1)
QuestScrollFrame.DetailFrame.Backdrop:SetPoint("TOPLEFT", QuestScrollFrame.DetailFrame, "TOPLEFT", 3, 1)
QuestScrollFrame.DetailFrame.Backdrop:SetPoint("BOTTOMRIGHT", QuestScrollFrame.DetailFrame, "BOTTOMRIGHT", -2, -7)
AS:SetInside(QuestScrollFrame.Background, QuestScrollFrame.DetailFrame.Backdrop)
QuestScrollFrame.Contents.StoryHeader.Background:SetWidth(251)
QuestScrollFrame.Contents.StoryHeader.Background:SetPoint("TOP", 0, -9)
QuestScrollFrame.Contents.StoryHeader.Text:SetPoint("TOPLEFT", 18, -20)
......
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