api: only add shadow to specific frames

This commit is contained in:
shagu
2019-06-02 20:43:56 +02:00
parent 85b4c4334a
commit 545be99fd7
63 changed files with 150 additions and 17 deletions
+1
View File
@@ -885,6 +885,7 @@ pfUI:RegisterModule("actionbar", 20400, function ()
-- apply backdrop settings
if background == "1" then
CreateBackdrop(bars[i], border)
CreateBackdropShadow(bars[i])
bars[i].backdrop:Show()
-- share backdrop of main and top actionbar
+1
View File
@@ -34,6 +34,7 @@ pfUI:RegisterModule("addonbuttons", function ()
pfUI.addonbuttons:SetFrameStrata("HIGH")
pfUI.addonbuttons:Hide()
CreateBackdrop(pfUI.addonbuttons)
CreateBackdropShadow(frame.addonbuttons)
pfUI.addonbuttons.minimapbutton = CreateFrame("Button", "pfMinimapButton", pfUI.minimap or UIParent)
pfUI.addonbuttons.minimapbutton:SetFrameStrata("MEDIUM")
+1
View File
@@ -27,6 +27,7 @@ pfUI:RegisterModule("addons", 20400, function ()
pfUI.addons:Hide()
CreateBackdrop(pfUI.addons, nil, true, .75)
CreateBackdropShadow(pfUI.addons)
pfUI.addons:SetScript("OnHide", function()
UIDropDownMenu_ClearAll(this.profile.dropdown)
+2
View File
@@ -246,6 +246,7 @@ pfUI:RegisterModule("bags", 20400, function ()
pfUI.bag:CreateAdditions(frame)
frame:SetFrameStrata("HIGH")
CreateBackdrop(frame, default_border)
CreateBackdropShadow(frame)
local topspace = pfUI.bag.right.close:GetHeight() + default_border * 2
@@ -449,6 +450,7 @@ pfUI:RegisterModule("bags", 20400, function ()
frame.bagslots:SetPoint("BOTTOM"..position, frame, "TOP"..position, 0, default_border*3)
CreateBackdrop(frame.bagslots, default_border)
CreateBackdropShadow(frame.bagslots)
local extra = 0
if frame == pfUI.bag.left and GetNumBankSlots() < 6 then extra = 1 end
+1
View File
@@ -54,6 +54,7 @@ pfUI:RegisterModule("bubbles", 20400, function ()
f.frame.text:SetAllPoints(f.frame)
CreateBackdrop(f.frame, nil, nil, alpha)
CreateBackdropShadow(f.frame)
f.frame.backdrop:SetPoint("TOPLEFT", f, "TOPLEFT", -10, -10)
f.frame.backdrop:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", 10, 10)
+2
View File
@@ -52,6 +52,7 @@ pfUI:RegisterModule("buff", 20400, function ()
buff.mode = buff.btype
buff.texture:SetTexture(GetPlayerBuffTexture(buff.bid))
CreateBackdrop(buff)
CreateBackdropShadow(buff)
if buff.btype == "HARMFUL" then
local dtype = GetPlayerBuffDispelType(buff.bid)
@@ -193,6 +194,7 @@ pfUI:RegisterModule("buff", 20400, function ()
end)
CreateBackdrop(buff)
CreateBackdropShadow(buff)
RefreshBuffButton(buff)
return buff
+1
View File
@@ -200,6 +200,7 @@ pfUI:RegisterModule("buffwatch", function ()
frame:SetScript("OnLeave", StatusBarOnLeave)
CreateBackdrop(frame)
CreateBackdropShadow(frame)
if bordercolor.r ~= "0" and bordercolor.g ~= "0" and bordercolor.b ~= "0" and bordercolor.a ~= "0" then
frame.backdrop:SetBackdropBorderColor(bordercolor.r,bordercolor.g,bordercolor.b,1)
end
+2
View File
@@ -28,6 +28,7 @@ pfUI:RegisterModule("castbar", 20400, function ()
cb.icon.texture:SetAllPoints()
cb.icon.texture:SetTexCoord(.08, .92, .08, .92)
CreateBackdrop(cb.icon, default_border)
CreateBackdropShadow(cb.icon)
-- statusbar
cb.bar = CreateFrame("StatusBar", nil, cb)
@@ -39,6 +40,7 @@ pfUI:RegisterModule("castbar", 20400, function ()
local r,g,b,a = strsplit(",", C.appearance.castbar.castbarcolor)
cb.bar:SetStatusBarColor(r,g,b,a)
CreateBackdrop(cb.bar, default_border)
CreateBackdropShadow(cb.bar)
-- text left
cb.bar.left = cb.bar:CreateFontString("Status", "DIALOG", "GameFontNormal")
+3
View File
@@ -38,6 +38,8 @@ pfUI:RegisterModule("chat", 20400, function ()
pfUI.chat.left:SetScript("OnShow", function() pfUI.chat:RefreshChat() end)
UpdateMovable(pfUI.chat.left)
CreateBackdrop(pfUI.chat.left, default_border, nil, .8)
CreateBackdropShadow(pfUI.chat.left)
if C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
pfUI.chat.left.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
@@ -195,6 +197,7 @@ pfUI:RegisterModule("chat", 20400, function ()
pfUI.chat.right:SetScript("OnShow", function() pfUI.chat:RefreshChat() end)
UpdateMovable(pfUI.chat.right)
CreateBackdrop(pfUI.chat.right, default_border, nil, .8)
CreateBackdropShadow(pfUI.chat.right)
if C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
pfUI.chat.right.backdrop:SetBackdropColor(tonumber(r), tonumber(g), tonumber(b), tonumber(a))
+1
View File
@@ -23,6 +23,7 @@ pfUI:RegisterModule("combopoints", function ()
pfUI.combopoints["combopoint" .. point]:SetWidth(combo_size)
pfUI.combopoints["combopoint" .. point]:SetHeight(combo_size)
CreateBackdrop(pfUI.combopoints["combopoint" .. point])
CreateBackdropShadow(pfUI.combopoints["combopoint" .. point])
if pfUI.uf.target then
pfUI.combopoints["combopoint" .. point]:SetPoint("TOPLEFT", pfUI.uf.target, "TOPRIGHT", C.appearance.border.default*3, -(point - 1) * (combo_size + C.appearance.border.default*3))
+1
View File
@@ -66,6 +66,7 @@ pfUI:RegisterModule("firstrun", 20400, function ()
end)
CreateBackdrop(f, nil, nil, .85)
CreateBackdropShadow(f)
-- text
f.text = f:CreateFontString("Status", "OVERLAY", "GameFontNormal")
+1
View File
@@ -623,6 +623,7 @@ pfUI:RegisterModule("gui", 20400, function ()
end)
CreateBackdrop(pfUI.gui, nil, true, .85)
CreateBackdropShadow(pfUI.gui)
table.insert(UISpecialFrames, "pfConfigGUI")
-- make some locals available to thirdparty
+2
View File
@@ -493,8 +493,10 @@ pfUI:RegisterModule("loot", 20400, function ()
local color = ITEM_QUALITY_COLORS[maxrarity]
if maxrarity <= 1 then
CreateBackdrop(pfUI.loot)
CreateBackdropShadow(pfUI.loot)
else
CreateBackdrop(pfUI.loot)
CreateBackdropShadow(pfUI.loot)
pfUI.loot.backdrop:SetBackdropBorderColor(color.r, color.g, color.b, 1)
end
pfUI.loot:SetHeight(math.max((real*22)+4*C.appearance.border.default), 20)
+1
View File
@@ -71,6 +71,7 @@ pfUI:RegisterModule("map", 20400, function ()
-- skin
WorldMapFrameCloseButton:SetPoint("TOPRIGHT", WorldMapFrame, "TOPRIGHT", 0, 0)
CreateBackdrop(WorldMapFrame)
CreateBackdropShadow(WorldMapFrame)
BlackoutWorld:Hide()
StripTextures(WorldMapFrame)
+1
View File
@@ -11,6 +11,7 @@ pfUI:RegisterModule("minimap", 20400, function ()
pfUI.minimap = CreateFrame("Frame","pfMinimap",UIParent)
CreateBackdrop(pfUI.minimap)
CreateBackdropShadow(pfUI.minimap)
pfUI.minimap:SetPoint("TOPRIGHT", UIParent, -5, -5)
UpdateMovable(pfUI.minimap)
pfUI.minimap:SetWidth(140)
+1
View File
@@ -18,6 +18,7 @@ pfUI:RegisterModule("mirrortimers", function ()
statusBar:SetHeight(18)
statusBar:SetPoint("TOP", 0, 0)
CreateBackdrop(statusBar)
CreateBackdropShadow(statusBar)
mirrorTimer:SetWidth(statusBar:GetWidth())
mirrorTimer:SetHeight(statusBar:GetHeight())
+3
View File
@@ -538,6 +538,7 @@ pfUI:RegisterModule("panel", 20400, function()
pfUI.panel.left:SetHeight(C.global.font_size*1.5)
CreateBackdrop(pfUI.panel.left, default_border, nil)
CreateBackdropShadow(pfUI.panel.left)
UpdateMovable(pfUI.panel.left)
pfUI.panel.left.hide = CreateFrame("Button", nil, pfUI.panel.left)
@@ -618,6 +619,7 @@ pfUI:RegisterModule("panel", 20400, function()
pfUI.panel.right:SetHeight(C.global.font_size*1.5)
CreateBackdrop(pfUI.panel.right, default_border, nil)
CreateBackdropShadow(pfUI.panel.right)
UpdateMovable(pfUI.panel.right)
pfUI.panel.right.hide = CreateFrame("Button", nil, pfUI.panel.right)
@@ -695,6 +697,7 @@ pfUI:RegisterModule("panel", 20400, function()
pfUI.panel.minimap:SetFrameStrata("MEDIUM")
CreateBackdrop(pfUI.panel.minimap, default_border)
CreateBackdropShadow(pfUI.panel.minimap)
UpdateMovable(pfUI.panel.minimap)
pfUI.panel.minimap.text = pfUI.panel.minimap:CreateFontString("MinimapZoneText", "LOW", "GameFontNormal")
+2
View File
@@ -79,6 +79,8 @@ pfUI:RegisterModule("roll", 20400, function ()
local f = CreateFrame("Frame", "pfLootRollFrame" .. id, UIParent)
CreateBackdrop(f, nil, nil, .8)
CreateBackdropShadow(f)
f.backdrop:SetFrameStrata("BACKGROUND")
f.hasItem = 1
+1
View File
@@ -272,6 +272,7 @@ pfUI:RegisterModule("share", 20400, function ()
end)
CreateBackdrop(f, nil, true, 0.8)
CreateBackdropShadow(f)
table.insert(UISpecialFrames, "pfShare")
do -- Edit Box
+3
View File
@@ -58,7 +58,10 @@ pfUI:RegisterModule("skin", 20400, function ()
for i = 1, UIDROPDOWNMENU_MAXLEVELS do
CreateBackdrop(_G["DropDownList"..i.."MenuBackdrop"], nil, true, .8)
CreateBackdropShadow(_G["DropDownList"..i.."MenuBackdrop"])
CreateBackdrop(_G["DropDownList"..i.."Backdrop"], nil, true, .8)
CreateBackdropShadow(_G["DropDownList"..i.."Backdrop"])
end
if C.global.errors_limit == "1" then
+12 -1
View File
@@ -35,7 +35,7 @@ pfUI:RegisterModule("thirdparty", function ()
local function RefreshKtmWidth(width)
local width = width or pfUI.chat.right:GetWidth()
if (pfUI.thirdparty.meters.damage and pfUI.thirdparty.meters.threat) then
if (pfUI.thirdparty.meters.damage and pfUI.thirdparty.meters.threat) then
width = width / 2
end
SetKtmWidth(KLHTM_Gui.raid, GetKtmWidthDiff(KLHTM_Gui.raid, width))
@@ -210,6 +210,7 @@ pfUI:RegisterModule("thirdparty", function ()
end
CreateBackdrop(KLHTM_Frame, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(KLHTM_Frame)
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
@@ -321,6 +322,7 @@ pfUI:RegisterModule("thirdparty", function ()
for k, val in pairs(DPSMateSettings["windows"]) do
local frame = _G["DPSMate_"..val["name"]]
CreateBackdrop(frame, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(frame)
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
@@ -390,6 +392,7 @@ pfUI:RegisterModule("thirdparty", function ()
_G.SW_BARSEPY = 1
CreateBackdrop(SW_BarFrame1, nil, nil, (C.thirdparty.chatbg == "1" and .8))
CreateBackdropShadow(SW_BarFrame1)
if C.thirdparty.chatbg == "1" and C.chat.global.custombg == "1" then
local r, g, b, a = strsplit(",", C.chat.global.background)
@@ -447,6 +450,8 @@ pfUI:RegisterModule("thirdparty", function ()
local windowname = this:GetName()
CreateBackdrop(_G[windowname], nil, nil, .8)
CreateBackdropShadow(_G[windowname])
_G[windowname .. "From"]:ClearAllPoints()
_G[windowname .. "From"]:SetPoint("TOP", 0, -10)
@@ -724,6 +729,7 @@ pfUI:RegisterModule("thirdparty", function ()
FlightMapTimesFrame:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
FlightMapTimesFrame:SetHeight(18)
CreateBackdrop(FlightMapTimesFrame)
CreateBackdropShadow(FlightMapTimesFrame)
FlightMapTimesText:ClearAllPoints()
FlightMapTimesText:SetPoint("CENTER", FlightMapTimesFrame, "CENTER", 0, 0)
@@ -800,6 +806,8 @@ pfUI:RegisterModule("thirdparty", function ()
if C.thirdparty.atlasloot.enable == "0" then return end
CreateBackdrop(AtlasLootTooltip)
CreateBackdropShadow(AtlasLootTooltip)
if pfUI.eqcompare then
HookScript(AtlasLootTooltip, "OnShow", pfUI.eqcompare.GameTooltipShow)
HookScript(AtlasLootTooltip, "OnHide", function()
@@ -852,6 +860,7 @@ pfUI:RegisterModule("thirdparty", function ()
DruidManaBar.text:SetFontObject(GameFontWhite)
CreateBackdrop(DruidManaBar)
CreateBackdropShadow(DruidManaBar)
DruidManaBar:SetScript("OnMouseUp", function(button)
f:Click(button)
@@ -892,6 +901,8 @@ pfUI:RegisterModule("thirdparty", function ()
-- Main window
pfUI.api.StripTextures(NoteInputFrame, true)
CreateBackdrop(NoteInputFrame, nil, nil, .75)
CreateBackdropShadow(NoteInputFrame)
NoteInputFrame.backdrop:SetPoint("TOPLEFT", 10, -12)
NoteInputFrame.backdrop:SetPoint("BOTTOMRIGHT", -32, 30)
+3 -1
View File
@@ -1,5 +1,5 @@
pfUI:RegisterModule("tooltip", 20400, function ()
pfUI.tooltip = CreateFrame('Frame', "pfTooltip", GameTooltip)
pfUI.tooltip.anchorframe = CreateFrame('Frame', "pfTooltipAnchor", UIParent)
pfUI.tooltip.anchorframe:SetWidth(128)
@@ -154,6 +154,8 @@ pfUI:RegisterModule("tooltip", 20400, function ()
GameTooltipStatusBar:SetPoint("BOTTOMRIGHT", GameTooltip, "TOPRIGHT", 0, 0)
GameTooltipStatusBar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
CreateBackdrop(GameTooltipStatusBar)
CreateBackdropShadow(GameTooltipStatusBar)
GameTooltipStatusBar.SetStatusBarColor_orig = GameTooltipStatusBar.SetStatusBarColor
GameTooltipStatusBar.SetStatusBarColor = function() return end
+2
View File
@@ -51,6 +51,8 @@ pfUI:RegisterModule("tracking", function ()
pfUI.tracking = CreateFrame("Button", "pfUITracking", UIParent)
pfUI.tracking:SetFrameStrata("LOW")
CreateBackdrop(pfUI.tracking, config.border)
CreateBackdropShadow(pfUI.tracking)
pfUI.tracking:SetPoint("TOPLEFT", pfUI.minimap, -10, -10)
UpdateMovable(pfUI.tracking)
pfUI.tracking:SetWidth(config.size)
+2
View File
@@ -23,6 +23,7 @@ pfUI:RegisterModule("xpbar", 20400, function ()
end
pfUI.xp:SetFrameStrata("BACKGROUND")
CreateBackdrop(pfUI.xp)
CreateBackdropShadow(pfUI.xp)
UpdateMovable(pfUI.xp)
pfUI.xp:RegisterEvent("PLAYER_LEVEL_UP")
@@ -142,6 +143,7 @@ pfUI:RegisterModule("xpbar", 20400, function ()
end
pfUI.rep:SetFrameStrata("BACKGROUND")
CreateBackdrop(pfUI.rep)
CreateBackdropShadow(pfUI.rep)
UpdateMovable(pfUI.rep)
pfUI.rep.bar = CreateFrame("StatusBar", nil, pfUI.rep)