Commit f09f5e77 authored by Azilroka's avatar Azilroka

ClassColor / Talents

parent 57e76921
......@@ -172,7 +172,7 @@ function AS:SkinButton(Button, Strip)
end
end
function AS:CreateShadow(Frame)
function AS:CreateShadow(Frame, NoRegister)
if Frame.Shadow then return end
local Shadow = CreateFrame("Frame", nil, Frame)
......@@ -183,7 +183,7 @@ function AS:CreateShadow(Frame)
Shadow:SetBackdrop({ edgeFile = [[Interface\AddOns\AddOnSkins\Media\Textures\Shadows]], edgeSize = AS:Scale(3) })
Shadow:SetBackdropBorderColor(0, 0, 0, 0.8)
if AS.ES then
if (not NoRegister) and AS.ES then
AS.ES:RegisterShadow(Shadow)
end
......@@ -328,12 +328,12 @@ function AS:SkinRadioButton(Button)
if Button.isSkinned then return end
Button:SetCheckedTexture("Interface\\AddOns\\AddOnSkins\\Media\\Textures\\RadioCircleChecked")
Button:GetCheckedTexture():SetVertexColor(0, 0.44, .87, 1)
Button:GetCheckedTexture():SetVertexColor(unpack(AS.Color))
Button:GetCheckedTexture():SetTexCoord(0, 1, 0, 1)
Button:SetHighlightTexture("Interface\\AddOns\\AddOnSkins\\Media\\Textures\\RadioCircleChecked")
Button:GetHighlightTexture():SetTexCoord(0, 1, 0, 1)
Button:GetHighlightTexture():SetVertexColor(0, 0.44, .87, 1)
Button:GetHighlightTexture():SetVertexColor(unpack(AS.Color))
Button:SetNormalTexture("Interface\\AddOns\\AddOnSkins\\Media\\Textures\\RadioCircle")
Button:GetNormalTexture():SetOutside()
......@@ -345,7 +345,7 @@ function AS:SkinRadioButton(Button)
if self:GetChecked() then
self:SetDisabledTexture("Interface\\AddOns\\AddOnSkins\\Media\\Textures\\RadioCircle")
self:GetDisabledTexture():SetVertexColor(0, 0.44, .87, 1)
self:GetDisabledTexture():SetVertexColor(unpack(AS.Color))
else
self:SetDisabledTexture("Interface\\AddOns\\AddOnSkins\\Media\\Textures\\RadioCircle")
self:GetDisabledTexture():SetVertexColor(unpack(AS.BorderColor))
......@@ -750,8 +750,16 @@ function AS:SkinTooltip(tooltip, scale)
end)
end
function AS:SkinTexture(frame)
frame:SetTexCoord(unpack(AS.TexCoords))
function AS:SkinTexture(icon, parent)
icon:SetTexCoord(unpack(AS.TexCoords))
if parent then
local layer, subLevel = icon:GetDrawLayer()
local iconBorder = parent:CreateTexture(nil, layer, nil, subLevel - 1)
iconBorder:SetPoint("TOPLEFT", icon, -1, 1)
iconBorder:SetPoint("BOTTOMRIGHT", icon, 1, -1)
iconBorder:SetColorTexture(0, 0, 0)
return iconBorder
end
end
function AS:Desaturate(frame)
......
......@@ -226,6 +226,8 @@ function AS:StartSkinning(event)
AS.Mult = 768 / AS.ScreenHeight / UIParent:GetScale()
AS.ParchmentEnabled = AS:CheckOption('Parchment')
AS.Color = AS:CheckOption('ClassColor') and AS.ClassColor or { 0, 0.44, .87, 1 }
for addonName, alldata in pairs(AS.register) do
for _, data in pairs(alldata) do
AS:RegisteredSkin(addonName, data.priority, data.func, data.events)
......
......@@ -100,6 +100,7 @@ function AS:BuildProfile()
['EmbedSystemMessage'] = true,
['ElvUISkinModule'] = false,
['ThinBorder'] = true,
['ClassColor'] = false,
},
}
......@@ -404,26 +405,31 @@ function AS:BuildOptions()
['Default'] = 'Default',
}
},
ClassColor = {
type = 'toggle',
name = ASL['Class Color'],
order = 2,
},
WeakAuraAuraBar = {
type = 'toggle',
name = ASL['WeakAura AuraBar'],
order = 2,
order = 3,
disabled = function() return not AS:CheckOption('WeakAuras', 'WeakAuras') end,
},
Parchment = {
type = 'toggle',
name = ASL['Parchment'],
order = 3,
order = 4,
},
SkinDebug = {
type = 'toggle',
name = ASL['Enable Skin Debugging'],
order = 4,
order = 5,
},
LoginMsg = {
type = 'toggle',
name = ASL['Login Message'],
order = 5,
order = 6,
},
},
},
......
......@@ -49,7 +49,7 @@ AddOn.ScreenWidth, AddOn.ScreenHeight = GetPhysicalScreenSize()
local Color = RAID_CLASS_COLORS[AddOn.MyClass]
AddOn.ClassColor = { Color.r, Color.g, Color.b }
AddOn.Color = { 0, 0.44, .87, 1 }
AddOn.Mult = 1
AddOn.skins = {}
AddOn.events = {}
......
......@@ -49,10 +49,10 @@ function AS:Blizzard_Calendar(event, addon)
AS:SkinFrame(CalendarTodayFrame)
AS:CreateBackdrop(CalendarTodayFrame)
CalendarTodayFrame:SetSize(CalendarDayButton1:GetWidth(), CalendarDayButton1:GetHeight())
CalendarTodayFrame:SetBackdropBorderColor(0, 0.44, .87, 1)
CalendarTodayFrame:SetBackdropBorderColor(unpack(AS.Color))
CalendarTodayFrame:SetBackdropColor(0, 0, 0, 0)
CalendarTodayFrame:HookScript('OnUpdate', function(self) self:SetAlpha(CalendarTodayTextureGlow:GetAlpha()) end)
CalendarTodayFrame.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
CalendarTodayFrame.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
CalendarTodayFrame.Backdrop:SetBackdropColor(0, 0, 0, 0)
CalendarTodayFrame.Backdrop:CreateShadow()
end
......
......@@ -67,7 +67,7 @@ function AS:Blizzard_Inspect(event, addon)
AS:SkinFrame(Frame)
Frame:EnableMouse(true)
Frame:SetScript('OnEnter', function(self)
self:SetBackdropBorderColor(0, 0.44, .87, 1)
self:SetBackdropBorderColor(unpack(AS.Color))
end)
Frame:SetScript('OnLeave', function(self)
self:SetBackdropBorderColor(unpack(AS.BorderColor))
......@@ -111,4 +111,4 @@ function AS:Blizzard_Inspect(event, addon)
InspectGuildFrameBG:SetTexture('')
end
AS:RegisterSkin("Blizzard_Inspect", AS.Blizzard_Inspect, 'ADDON_LOADED')
\ No newline at end of file
AS:RegisterSkin("Blizzard_Inspect", AS.Blizzard_Inspect, 'ADDON_LOADED')
......@@ -38,8 +38,8 @@ function AS:Blizzard_PvE(event, addon)
end)
Button:HookScript('OnLeave', function(self)
if self:GetID() == GroupFinderFrame.selectionIndex then
self:SetBackdropBorderColor(0, 0.44, .87, 1)
self.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
self:SetBackdropBorderColor(unpack(AS.Color))
self.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
self:SetBackdropBorderColor(unpack(AS.BorderColor))
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
......@@ -51,8 +51,8 @@ function AS:Blizzard_PvE(event, addon)
for i = 1, 4 do
local Button = GroupFinderFrame["groupButton"..i]
if GroupFinderFrame.selectionIndex == Button:GetID() then
Button:SetBackdropBorderColor(0, 0.44, .87, 1)
Button.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
Button:SetBackdropBorderColor(unpack(AS.Color))
Button.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
Button:SetBackdropBorderColor(unpack(AS.BorderColor))
Button.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
......@@ -346,8 +346,8 @@ function AS:Blizzard_PVPUI(_, addon)
end)
Button:HookScript('OnLeave', function(self)
if self:GetID() == self.isSelected then
self:SetBackdropBorderColor(0, 0.44, .87, 1)
self.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
self:SetBackdropBorderColor(unpack(AS.Color))
self.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
self:SetBackdropBorderColor(unpack(AS.BorderColor))
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
......@@ -363,8 +363,8 @@ function AS:Blizzard_PVPUI(_, addon)
for i = 1, 3 do
local Button = PVPQueueFrame["CategoryButton"..i]
if ( i == index ) then
Button:SetBackdropBorderColor(0, 0.44, .87, 1)
Button.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
Button:SetBackdropBorderColor(unpack(AS.Color))
Button.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
Button.isSelected = i
else
Button:SetBackdropBorderColor(unpack(AS.BorderColor))
......@@ -393,7 +393,7 @@ function AS:Blizzard_PVPUI(_, addon)
end)
Button:HookScript('OnLeave', function(self)
if self.SelectedTexture:IsShown() then
self:SetBackdropBorderColor(0, 0.44, .87, 1)
self:SetBackdropBorderColor(unpack(AS.Color))
else
self:SetBackdropBorderColor(unpack(AS.BorderColor))
end
......@@ -405,7 +405,7 @@ function AS:Blizzard_PVPUI(_, addon)
for _, Section in pairs({ 'RandomBGButton', 'RandomEpicBGButton', 'Arena1Button', 'BrawlButton' }) do
local Button = HonorFrame.BonusFrame[Section]
if Button.SelectedTexture:IsShown() then
Button:SetBackdropBorderColor(0, 0.44, .87, 1)
Button:SetBackdropBorderColor(unpack(AS.Color))
else
Button:SetBackdropBorderColor(unpack(AS.BorderColor))
end
......@@ -430,7 +430,7 @@ function AS:Blizzard_PVPUI(_, addon)
end)
Button:HookScript('OnLeave', function(self)
if self.SelectedTexture:IsShown() then
self:SetBackdropBorderColor(0, 0.44, .87, 1)
self:SetBackdropBorderColor(unpack(AS.Color))
else
self:SetBackdropBorderColor(unpack(AS.BorderColor))
end
......@@ -442,7 +442,7 @@ function AS:Blizzard_PVPUI(_, addon)
for _, Section in pairs({ 'RatedBG', 'Arena2v2', 'Arena3v3'}) do
local Button = ConquestFrame[Section]
if Button.SelectedTexture:IsShown() then
Button:SetBackdropBorderColor(0, 0.44, .87, 1)
Button:SetBackdropBorderColor(unpack(AS.Color))
else
Button:SetBackdropBorderColor(unpack(AS.BorderColor))
end
......
This diff is collapsed.
......@@ -36,7 +36,7 @@ function AS:Blizzard_Trainer(event, addon)
end)
ClassTrainerFrameSkillStepButton:HookScript('OnLeave', function(self)
if self.selectedTex:IsShown() then
self.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
self.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
......@@ -56,7 +56,7 @@ function AS:Blizzard_Trainer(event, addon)
end)
Button:HookScript('OnLeave', function(self)
if self.selectedTex:IsShown() then
self.Backdrop:SetBackdropBorderColor(0, 0.44, .87, 1)
self.Backdrop:SetBackdropBorderColor(unpack(AS.Color))
else
self.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
end
......@@ -78,4 +78,4 @@ function AS:Blizzard_Trainer(event, addon)
end)
end
AS:RegisterSkin("Blizzard_Trainer", AS.Blizzard_Trainer, 'ADDON_LOADED')
\ No newline at end of file
AS:RegisterSkin("Blizzard_Trainer", AS.Blizzard_Trainer, 'ADDON_LOADED')
......@@ -24,7 +24,7 @@ function AS:Ace3()
widget.skinnedCheckBG = CreateFrame('Frame', nil, widget.frame)
AS:SetTemplate(widget.skinnedCheckBG, 'Default', true)
widget.skinnedCheckBG:SetInside(widget.checkbg, 4, 4)
widget.skinnedCheckBG:SetScript('OnShow', function() widget.check:SetInside() widget.check:SetTexture(AS.NormTex) widget.check:SetVertexColor(0, .44, .87) end)
widget.skinnedCheckBG:SetScript('OnShow', function() widget.check:SetInside() widget.check:SetTexture(AS.NormTex) widget.check:SetVertexColor(unpack(AS.Color)) end)
end
widget.check:SetParent(widget.skinnedCheckBG)
......
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