So this code below does nothing. No errors.
If I remove the "if addon" line it works, but then it will be executed multiple times. This did work before 6.2.
Somebody can help me?
Lua Code:
local function ApplySkin(self, event, addon)
if addon == "Skada" then
local SkadaDisplayBar = Skada.displays["bar"]
hooksecurefunc(SkadaDisplayBar, "AddDisplayOptions", function(self, win, options)
options.titleoptions = nil
options.windowoptions = nil
end)
hooksecurefunc(SkadaDisplayBar, "Create", function(self, win)
local skada = win.bargroup
local skadaBorder = CreateFrame("Frame", nil, skada, skada)
skadaBorder:SetAllPoints()
skadaBorder:CreateBeautyBorder(12)
skadaBorder:SetBeautyBorderPadding(3)
end)
hooksecurefunc(SkadaDisplayBar, "ApplySettings", function(self, win)
local skada = win.bargroup
skada:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = nil, tile = false, tileSize = 0, edgeSize = 32,
insets = { left = 0, right = 0, top = 0, bottom = 0 }
})
skada:SetBackdropColor(0, 0, 0, 0.8)
end)
end
end
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", ApplySkin)