3ed8d72ea3
- Closes #29 Reintroduces UI scale issues when playing at 1080p pixel-perfect (0.711 scale). You need to account for this by adjusting the Aura size slightly up or down by a small number, depending on scaling. We have this anyway across the addon, so it is what it is...
62 lines
1.5 KiB
Lua
62 lines
1.5 KiB
Lua
if not WeakAuras.IsLibsOK() then return end
|
|
local AddonName, Private = ...
|
|
local L = WeakAuras.L;
|
|
|
|
do
|
|
local function subSupports(regionType)
|
|
return regionType ~= "group" and regionType ~= "dynamicgroup"
|
|
end
|
|
|
|
local function noop()
|
|
end
|
|
|
|
local function subSetFrameLevel(self, level)
|
|
self.parent:SetFrameLevel(level)
|
|
end
|
|
|
|
local function subCreate()
|
|
return { Update = noop, SetFrameLevel = subSetFrameLevel}
|
|
end
|
|
|
|
local function subModify(parent, region)
|
|
region.parent = parent
|
|
end
|
|
|
|
WeakAuras.RegisterSubRegionType("subbackground", L["Background"], subSupports, subCreate, subModify,
|
|
noop, noop, {}, nil, {}, false)
|
|
end
|
|
|
|
-- Foreground for aurabar
|
|
|
|
do
|
|
local function subSupports(regionType)
|
|
return regionType == "aurabar"
|
|
end
|
|
|
|
local function noop()
|
|
end
|
|
|
|
local function subSetFrameLevel(self, level)
|
|
if self.parent.fgFrame then
|
|
self.parent.fgFrame:SetFrameLevel(level)
|
|
end
|
|
if self.parent.bar then
|
|
self.parent.bar:SetFrameLevel(level)
|
|
end
|
|
if self.parent.iconFrame then
|
|
self.parent.iconFrame:SetFrameLevel(level)
|
|
end
|
|
end
|
|
|
|
local function subCreate()
|
|
return { Update = noop, SetFrameLevel = subSetFrameLevel}
|
|
end
|
|
|
|
local function subModify(parent, region)
|
|
region.parent = parent
|
|
end
|
|
|
|
WeakAuras.RegisterSubRegionType("subforeground", L["Foreground"], subSupports, subCreate, subModify,
|
|
noop, noop, {}, nil, {}, false)
|
|
end
|