Commit 64a1760c authored by Azilroka's avatar Azilroka

API Update

parent 4940acaa
This diff is collapsed.
......@@ -221,12 +221,11 @@ end
function AS:StartSkinning(event)
AS:UnregisterEvent(event)
AS:UpdateMedia()
AS.Color = AS:CheckOption('ClassColor') and AS.ClassColor or { 0, 0.44, .87, 1 }
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 }
AS:UpdateMedia()
for addonName, alldata in pairs(AS.register) do
for _, data in pairs(alldata) do
......
......@@ -80,7 +80,7 @@ function AS:UpdateMedia()
AS.BackdropColor = E['media'].backdropcolor
AS.BorderColor = E['media'].bordercolor
AS.PixelPerfect = E.PixelMode
AS.ValueColor = E["media"].rgbvaluecolor
AS.Color = E["media"].rgbvaluecolor or AS.ClassColor
AS.HideShadows = false
E:GetModule('DataTexts'):RegisterLDB()
......
......@@ -35,9 +35,9 @@ function AS:Embed_Omen()
_G.Omen:OnProfileChanged(nil, db)
_G.OmenAnchor:SetParent(EmbedParent)
_G.OmenAnchor:SetTemplate()
AS:SetTemplate(_G.OmenAnchor)
_G.OmenAnchor:SetFrameLevel(AS:CheckOption('EmbedFrameLevel'))
_G.OmenAnchor:SetBackdropColor(0,0,0,0)
_G.OmenAnchor:SetBackdropColor(0, 0, 0, 0)
_G.OmenAnchor:ClearAllPoints()
_G.OmenAnchor:SetPoint('TOPLEFT', EmbedParent, 'TOPLEFT', 0, 0)
_G.OmenAnchor:SetPoint('BOTTOMRIGHT', EmbedParent, 'BOTTOMRIGHT', 0, 0)
......
......@@ -16,7 +16,7 @@ function AS:Embed_Recount()
if AS:CheckOption('Recount') then
if _G.Recount_MainWindow.Backdrop then
_G.Recount_MainWindow.Backdrop:SetTemplate(AS:CheckOption('TransparentEmbed') and 'Transparent' or 'Default')
AS:SetTemplate(_G.Recount_MainWindow.Backdrop, AS:CheckOption('TransparentEmbed') and 'Transparent' or 'Default')
if AS:CheckOption('RecountBackdrop') then
_G.Recount_MainWindow.Backdrop:Show()
else
......
......@@ -35,7 +35,7 @@ function AS:EmbedSkadaWindow(window, width, height, point, relativeFrame, relati
window.bargroup:SetFrameLevel(relativeFrame:GetFrameLevel())
window.bargroup:SetBackdrop(nil)
if window.bargroup.Backdrop then
window.bargroup.Backdrop:SetTemplate(AS:CheckOption('TransparentEmbed') and "Transparent" or 'Default')
AS:SetTemplate(window.bargroup.Backdrop, AS:CheckOption('TransparentEmbed') and "Transparent" or 'Default')
if AS:CheckOption('SkadaBackdrop') then
window.bargroup.Backdrop:Show()
else
......
......@@ -35,7 +35,7 @@ end
function AS:CreateToggleButton(Name, Text, Panel, TooltipText)
local Frame = CreateFrame('Button', Name, UIParent)
Frame:SetFrameStrata("DIALOG")
Frame:SetTemplate('Transparent')
AS:SetTemplate(Frame, 'Transparent')
Frame:Size(17, Panel:GetHeight() - 4)
Frame:FontString('Text', AS.ActionBarFont, 12)
Frame.Text:SetText(Text)
......
......@@ -44,6 +44,7 @@ AddOn.MyRealm = GetRealmName()
AddOn.Noop = function() end
AddOn.TexCoords = {.08, .92, .08, .92}
AddOn.UIScale = UIParent:GetScale()
AddOn.Faction = UnitFactionGroup("player")
AddOn.ScreenWidth, AddOn.ScreenHeight = GetPhysicalScreenSize()
......
......@@ -45,7 +45,7 @@ function AS:ArkInventory()
bar.IsSkinned = true
end
bar:SetTemplate(AS:CheckOption('SkinTemplate'))
AS:SetTemplate(bar)
if ArkInventory.Global.Mode.Edit then
bar:SetBackdropBorderColor(1, 0, 0, 1)
......
......@@ -5,8 +5,6 @@ if not AS:CheckAddOn('Atlas') then return end
function AS:Atlas(event, addon)
AS:SkinFrame(AtlasFrame)
AS:SkinFrame(AtlasFrameSmall)
AtlasFrame:SetTemplate("Transparent")
AtlasFrameSmall:SetTemplate("Transparent")
-- Skin Elements
AS:SkinCloseButton(AtlasFrameCloseButton)
......@@ -50,4 +48,4 @@ function AS:Atlas(event, addon)
AtlasSwitchButton:Point('BOTTOMRIGHT', AtlasFrame, 'BOTTOMRIGHT', -10, 10)
end
AS:RegisterSkin('Atlas', AS.Atlas)
\ No newline at end of file
AS:RegisterSkin('Atlas', AS.Atlas)
......@@ -13,7 +13,6 @@ function AS:BagSync()
for _, frame in pairs(Frames) do
AS:SkinFrame(frame)
frame:SetTemplate("Transparent")
frame:HookScript('OnShow', function(self)
if self.scrollbar and not self.scrollbar.isSkinned then
AS:CreateBackdrop(self.scrollbar)
......@@ -55,4 +54,4 @@ function AS:BagSync()
-- end)
end
AS:RegisterSkin('BagSync', AS.BagSync)
\ No newline at end of file
AS:RegisterSkin('BagSync', AS.BagSync)
......@@ -10,7 +10,7 @@ function AS:Blizzard_Bags()
for j = 1, 36 do
local ItemButton = _G["ContainerFrame"..i.."Item"..j]
-- AS:SkinTexture(_G["ContainerFrame"..i.."Item"..j..'IconQuestTexture'])
AS:SetTemplate(ItemButton, AS:CheckOption('SkinTemplate'))
AS:SetTemplate(ItemButton)
AS:SkinTexture(ItemButton.icon)
ItemButton:SetNormalTexture('')
ItemButton:SetPushedTexture('')
......
......@@ -368,7 +368,7 @@ function AS:Blizzard_Guild(event, addon)
local Button = _G["GuildBankColumn"..i.."Button"..x]
Button:SetNormalTexture("")
AS:StyleButton(Button)
AS:SetTemplate(Button, 'Default', true)
AS:SetTemplate(Button, 'Default')
Button.icon:SetInside()
AS:SkinTexture(Button.icon)
Button.IconBorder:SetAlpha(0)
......
......@@ -377,7 +377,9 @@ function AS:Blizzard_PVPUI(_, addon)
if rewardTexture then
rewardFrame.Icon:SetTexture(rewardTexture)
rewardFrame.Icon.Backdrop:SetBackdropBorderColor(GetItemQualityColor(rewardQuaility))
if rewardFrame.Icon.Backdrop then
rewardFrame.Icon.Backdrop:SetBackdropBorderColor(GetItemQualityColor(rewardQuaility))
end
end
end)
......
......@@ -25,10 +25,10 @@ function AS:Blizzard_BindingUI() -- ADDON_LOADED Blizzard_BindingUI
local button2 = _G["KeyBindingFrameBinding"..i.."Key2Button"]
AS:StripTextures(button1, true)
AS:StyleButton(button1)
AS:SetTemplate(button1, 'Default', true)
AS:SetTemplate(button1, 'Default')
AS:StripTextures(button2, true)
AS:StyleButton(button2)
AS:SetTemplate(button2, 'Default', true)
AS:SetTemplate(button2, 'Default')
end
KeyBindingFrameUnbindButton:SetPoint("RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0)
......
......@@ -14,7 +14,7 @@ function AS:ColorPickerPlus()
hooksecurefunc(Region, "Show", Region.Hide) --This is just a precaution, in case something tries to call :Show on them
end
end
AS:SetTemplate(ColorPickerFrame, AS:CheckOption('SkinTemplate'))
AS:SetTemplate(ColorPickerFrame)
AS:SkinButton(ColorPPSwitcher)
AS:SkinButton(ColorPickerOkayButton)
......
......@@ -10,7 +10,7 @@ function AS:Omen()
Omen.db.profile.TitleBar.UseSameBG = true
AS:SkinFrame(Omen.BarList, 'Default')
AS:SkinTitleBar(Omen.Title, 'Default')
AS:SkinFrame(Omen.Title, 'Default')
Omen.BarList.SetBackdrop = AS.Noop
Omen.BarList.SetBackdropColor = AS.Noop
Omen.BarList.SetBackdropBorderColor = AS.Noop
......@@ -31,4 +31,4 @@ function AS:Omen()
Omen:ResizeBars()
end
AS:RegisterSkin('Omen', AS.Omen)
\ No newline at end of file
AS:RegisterSkin('Omen', AS.Omen)
......@@ -16,7 +16,7 @@ function AS:Recount()
frame.CloseButton:SetPoint('TOPRIGHT', frame, 'TOPRIGHT', -1, -9)
frame:SetBackdrop(nil)
frame.TitleBackground = CreateFrame('Frame', nil, frame)
AS:SkinTitleBar(frame.TitleBackground, 'Default')
AS:SkinFrame(frame.TitleBackground, 'Default')
frame.TitleBackground:SetPoint('TOP', frame, 'TOP', 0, -8)
frame.TitleBackground:SetScript('OnUpdate', function(self) self:SetSize(frame:GetWidth() - 4, 22) end)
frame.TitleBackground:SetFrameLevel(frame:GetFrameLevel())
......
......@@ -27,7 +27,7 @@ function AS:Skada()
skada:SetFrameLevel(5)
skada:SetBackdrop(nil)
if win.db.enabletitle then
AS:SkinTitleBar(skada.button, 'Default', true)
AS:SkinFrame(skada.button, 'Default')
local color = win.db.title.color
skada.button:SetBackdropColor(color.r, color.g, color.b, color.a or 1)
end
......@@ -76,4 +76,4 @@ function AS:Skada()
end)
end
AS:RegisterSkin('Skada', AS.Skada)
\ No newline at end of file
AS:RegisterSkin('Skada', AS.Skada)
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