from retail
diffchecked
This commit is contained in:
@@ -3,54 +3,56 @@ local AddonName, Private = ...
|
||||
local L = WeakAuras.L;
|
||||
|
||||
do
|
||||
local function subSupports(regionType)
|
||||
return regionType ~= "group" and regionType ~= "dynamicgroup"
|
||||
end
|
||||
local function subSupports(regionType)
|
||||
return regionType ~= "group" and regionType ~= "dynamicgroup"
|
||||
end
|
||||
|
||||
local function noop()
|
||||
end
|
||||
local function noop()
|
||||
end
|
||||
|
||||
local function subSetFrameLevel(self, level)
|
||||
self.parent:SetFrameLevel(level)
|
||||
end
|
||||
local function subSetFrameLevel(self, level)
|
||||
self.parent:SetFrameLevel(level)
|
||||
end
|
||||
|
||||
local function subCreate()
|
||||
return { Update = noop, SetFrameLevel = subSetFrameLevel}
|
||||
end
|
||||
local function subCreate()
|
||||
return { Update = noop, SetFrameLevel = subSetFrameLevel}
|
||||
end
|
||||
|
||||
local function subModify(parent, region)
|
||||
region.parent = parent
|
||||
end
|
||||
local function subModify(parent, region)
|
||||
region.parent = parent
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subbackground", L["Background"], subSupports, subCreate, subModify, noop, noop, {}, nil, {}, false);
|
||||
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 subSupports(regionType)
|
||||
return regionType == "aurabar"
|
||||
end
|
||||
|
||||
local function noop()
|
||||
end
|
||||
local function noop()
|
||||
end
|
||||
|
||||
local function subSetFrameLevel(self, level)
|
||||
if self.parent.bar then
|
||||
self.parent.bar:SetFrameLevel(level)
|
||||
end
|
||||
if self.parent.iconFrame then
|
||||
self.parent.iconFrame:SetFrameLevel(level)
|
||||
end
|
||||
local function subSetFrameLevel(self, level)
|
||||
if self.parent.bar then
|
||||
self.parent.bar:SetFrameLevel(level)
|
||||
end
|
||||
|
||||
local function subCreate()
|
||||
return { Update = noop, SetFrameLevel = subSetFrameLevel}
|
||||
if self.parent.iconFrame then
|
||||
self.parent.iconFrame:SetFrameLevel(level)
|
||||
end
|
||||
end
|
||||
|
||||
local function subModify(parent, region)
|
||||
region.parent = parent
|
||||
end
|
||||
local function subCreate()
|
||||
return { Update = noop, SetFrameLevel = subSetFrameLevel}
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subforeground", L["Foreground"], subSupports, subCreate, subModify, noop, noop, {}, nil, {}, false);
|
||||
local function subModify(parent, region)
|
||||
region.parent = parent
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subforeground", L["Foreground"], subSupports, subCreate, subModify,
|
||||
noop, noop, {}, nil, {}, false)
|
||||
end
|
||||
|
||||
@@ -34,7 +34,8 @@ local properties = {
|
||||
|
||||
|
||||
local function create()
|
||||
return CreateFrame("Frame", nil, UIParent)
|
||||
local region = CreateFrame("Frame", nil, UIParent)
|
||||
return region
|
||||
end
|
||||
|
||||
local function onAcquire(subRegion)
|
||||
@@ -55,7 +56,8 @@ local function modify(parent, region, parentData, data, first)
|
||||
edgeSize = data.border_size,
|
||||
bgFile = nil,
|
||||
})
|
||||
region:SetBackdropBorderColor(data.border_color[1], data.border_color[2], data.border_color[3], data.border_color[4])
|
||||
region:SetBackdropBorderColor(data.border_color[1], data.border_color[2],
|
||||
data.border_color[3], data.border_color[4])
|
||||
region:SetBackdropColor(0, 0, 0, 0)
|
||||
end
|
||||
|
||||
@@ -83,10 +85,11 @@ end
|
||||
|
||||
local function supports(regionType)
|
||||
return regionType == "texture"
|
||||
or regionType == "progresstexture"
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "empty"
|
||||
or regionType == "progresstexture"
|
||||
or regionType == "icon"
|
||||
or regionType == "aurabar"
|
||||
or regionType == "empty"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subborder", L["Border"], supports, create, modify, onAcquire, onRelease, default, nil, properties);
|
||||
WeakAuras.RegisterSubRegionType("subborder", L["Border"], supports, create, modify, onAcquire, onRelease,
|
||||
default, nil, properties)
|
||||
|
||||
@@ -2,7 +2,8 @@ if not WeakAuras.IsLibsOK() then return end
|
||||
local AddonName, Private = ...
|
||||
|
||||
local LCG = LibStub("LibCustomGlow-1.0")
|
||||
local MSQ = LibStub("Masque", true);
|
||||
|
||||
local MSQ = LibStub("Masque", true)
|
||||
local L = WeakAuras.L
|
||||
|
||||
local default = function(parentType)
|
||||
@@ -306,6 +307,9 @@ end
|
||||
|
||||
local function onRelease(subRegion)
|
||||
subRegion.glowType = nil
|
||||
if subRegion.glow then
|
||||
subRegion:SetVisible(false)
|
||||
end
|
||||
subRegion:Hide()
|
||||
subRegion:ClearAllPoints()
|
||||
subRegion:SetParent(UIParent)
|
||||
@@ -411,4 +415,5 @@ local function addDefaultsForNewAura(data)
|
||||
end
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subglow", L["Glow"], supports, create, modify, onAcquire, onRelease, default, addDefaultsForNewAura, properties);
|
||||
WeakAuras.RegisterSubRegionType("subglow", L["Glow"], supports, create, modify, onAcquire, onRelease,
|
||||
default, addDefaultsForNewAura, properties)
|
||||
|
||||
@@ -173,8 +173,6 @@ local function onRelease(subRegion)
|
||||
subRegion:Hide()
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function modify(parent, region, parentData, data, first)
|
||||
if region.model then
|
||||
ReleaseModel(region.model)
|
||||
@@ -204,6 +202,7 @@ local function modify(parent, region, parentData, data, first)
|
||||
extra_height = data.extra_height or 0
|
||||
end
|
||||
|
||||
region:ClearAllPoints()
|
||||
region:SetPoint("TOPLEFT", anchor ,"TOPLEFT", -extra_width/2, extra_height/2)
|
||||
region:SetPoint("BOTTOMRIGHT", anchor ,"BOTTOMRIGHT", extra_width/2, -extra_height/2)
|
||||
|
||||
|
||||
@@ -228,6 +228,7 @@ local funcs = {
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if requiresFrameTick then
|
||||
if not self.FrameTick then
|
||||
self.FrameTick = self.UpdateTickPlacement
|
||||
@@ -263,6 +264,7 @@ local funcs = {
|
||||
local minValue, maxValue = self.parent:GetMinMaxProgress()
|
||||
local valueRange = maxValue - minValue
|
||||
local inverse = self.inverse_direction
|
||||
|
||||
if self.parent.inverse then
|
||||
inverse = not inverse
|
||||
end
|
||||
@@ -444,11 +446,14 @@ local funcs = {
|
||||
self.use_texture = use
|
||||
self:UpdateTexture()
|
||||
end,
|
||||
|
||||
AnchorSubRegion = function(self, subRegion, anchorType, anchorPoint, subRegionPoint, anchorXOffset, anchorYOffset)
|
||||
subRegion:ClearAllPoints()
|
||||
|
||||
if anchorType == "point" then
|
||||
local xOffset = anchorXOffset or 0
|
||||
local yOffset = anchorYOffset or 0
|
||||
|
||||
subRegionPoint = Private.point_types[subRegionPoint] and subRegionPoint or "CENTER"
|
||||
local tickIndex = tonumber(anchorPoint:sub(6))
|
||||
local anchorTo = tickIndex and self.ticks[tickIndex] or nil
|
||||
|
||||
Reference in New Issue
Block a user