Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' of https://github.com/WeakAuras/WeakAuras2 into m…
Browse files Browse the repository at this point in the history
…aster

# Conflicts:
#	.pkgmeta-bcc
#	.pkgmeta-classic
  • Loading branch information
Maczuga committed May 27, 2021
2 parents 401377b + f2d6be2 commit f60e72a
Show file tree
Hide file tree
Showing 20 changed files with 102,224 additions and 12,077 deletions.
4 changes: 3 additions & 1 deletion .pkgmeta
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ externals:
WeakAuras/Libs/LibDataBroker-1.1: https://github.com/tekkub/libdatabroker-1-1
WeakAuras/Libs/LibCompress: https://repos.curseforge.com/wow/libcompress/trunk
WeakAuras/Libs/LibSpellRange-1.0: https://github.com/ascott18/LibSpellRange-1.0
WeakAuras/Libs/LibRangeCheck-2.0: https://repos.curseforge.com/wow/librangecheck-2-0/trunk/LibRangeCheck-2.0
WeakAuras/Libs/LibRangeCheck-2.0: https://github.com/WeakAuras/LibRangeCheck-2.0/
WeakAuras/Libs/LibCustomGlow-1.0: https://github.com/Stanzilla/LibCustomGlow
WeakAuras/Libs/LibDBIcon-1.0: https://repos.curseforge.com/wow/libdbicon-1-0/trunk/LibDBIcon-1.0
WeakAuras/Libs/LibGetFrame-1.0: https://github.com/mrbuds/LibGetFrame
Expand All @@ -39,6 +39,7 @@ ignore:
- update_translations.sh
- generate_changelog.sh
- WeakAurasModelPaths/ModelPathsClassic.lua
- WeakAurasModelPaths/ModelPathsBCC.lua
- WeakAurasTemplates/TriggerTemplatesDataClassic.lua
- WeakAurasTemplates/TriggerTemplatesDataBCC.lua

Expand All @@ -48,3 +49,4 @@ move-folders:
WeakAuras/WeakAurasModelPaths: WeakAurasModelPaths
WeakAuras/WeakAurasTemplates: WeakAurasTemplates
WeakAuras/WeakAurasArchive: WeakAurasArchive
WeakAuras/Libs/LibRangeCheck-2.0/LibRangeCheck-2.0: WeakAuras/Libs/LibRangeCheck-2.0
1 change: 0 additions & 1 deletion WeakAuras/AuraEnvironment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ local FakeWeakAurasMixin = {
GetDisplayButton = true,
Import = true,
NewDisplayButton = true,
OpenTriggerTemplate = true,
OpenCodeReview = true,
PickDisplay = true,
SetMoverSizer = true,
Expand Down
4 changes: 2 additions & 2 deletions WeakAuras/Libs/LibCustomGlow-1.0/LibCustomGlow-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -620,13 +620,13 @@ function lib.ButtonGlow_Start(r,color,frequency)
f:SetSize(width*1.4 , height*1.4)
f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2)
f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2)
f.ants:SetSize(width*1.4*0.85, height*1.4*0.85)
f.ants:SetSize(width*1.4*0.85, height*1.4*0.85)
AnimIn_OnFinished(f.animIn)
if f.animOut:IsPlaying() then
f.animOut:Stop()
f.animIn:Play()
end

if not(color) then
for texture in pairs(ButtonGlowTextures) do
f[texture]:SetDesaturated(nil)
Expand Down
22 changes: 13 additions & 9 deletions WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4790,6 +4790,10 @@ Private.event_prototypes = {
{
hidden = true,
test = "(inverse and duration == 0) or (not inverse and duration > 0)"
},
{
hidden = true,
test = "remainingCheck"
}
},
automaticrequired = true,
Expand Down Expand Up @@ -6661,24 +6665,24 @@ Private.event_prototypes = {
test = "true",
store = true
},
{
name = "spell",
display = L["Spell Name"],
type = "string",
enable = function(trigger) return not trigger.use_inverse end,
conditionType = "string",
store = true,
},
{
name = "spellId",
display = L["Spell Id"],
display = L["Spell"],
type = "spell",
enable = function(trigger) return not trigger.use_inverse end,
conditionType = "number",
showExactOption = true,
test = "WeakAuras.CompareSpellIds(spellId, %s, %s)",
store = true,
},
{
name = "spell",
display = L["Legacy Spellname"],
type = "string",
enable = function(trigger) return not trigger.use_inverse end,
conditionType = "string",
store = true,
},
{
name = "castType",
display = L["Cast Type"],
Expand Down
14 changes: 9 additions & 5 deletions WeakAuras/RegionTypes/DynamicGroup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ local function create(parent)
region.controlPoints.parent = region
WeakAuras.regionPrototype.create(region)
region.suspended = 0

local oldSetFrameLevel = region.SetFrameLevel
region.SetFrameLevel = function(self, level)
oldSetFrameLevel(self, level)
self.background:SetFrameLevel(level)
end

return region
end

Expand Down Expand Up @@ -1206,22 +1213,20 @@ local function modify(parent, region, data)
-- if self.dynamicAnchor then self:UpdateBorder(); return end
Private.StartProfileSystem("dynamicgroup")
Private.StartProfileAura(data.id)
local numVisible, minX, maxX, maxY, minY, minLevel = 0
local numVisible, minX, maxX, maxY, minY = 0
for active, regionData in ipairs(self.sortedChildren) do
if regionData.shown then
numVisible = numVisible + 1
local childRegion = regionData.region
local regionLeft, regionRight, regionTop, regionBottom
= SafeGetPos(childRegion, childRegion.GetLeft), SafeGetPos(childRegion, childRegion.GetRight),
SafeGetPos(childRegion, childRegion.GetTop), SafeGetPos(childRegion, childRegion.GetBottom)
local frameLevel = childRegion:GetFrameLevel()

if(regionLeft and regionRight and regionTop and regionBottom and frameLevel) then
if(regionLeft and regionRight and regionTop and regionBottom) then
minX = minX and min(regionLeft, minX) or regionLeft
maxX = maxX and max(regionRight, maxX) or regionRight
minY = minY and min(regionBottom, minY) or regionBottom
maxY = maxY and max(regionTop, maxY) or regionTop
minLevel = minLevel and min(frameLevel, minLevel) or frameLevel
end
end
end
Expand All @@ -1238,7 +1243,6 @@ local function modify(parent, region, data)
self:SetHeight(height)
self.currentWidth = width
self.currentHeight = height
self.background:SetFrameLevel(minLevel and minLevel - 1 or 0)
else
self:Hide()
end
Expand Down
14 changes: 6 additions & 8 deletions WeakAuras/RegionTypes/Group.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ local function create(parent)

WeakAuras.regionPrototype.create(region);

local oldSetFrameLevel = region.SetFrameLevel
region.SetFrameLevel = function(self, level)
oldSetFrameLevel(self, level)
self.border:SetFrameLevel(level)
end

return region;
end

Expand Down Expand Up @@ -92,7 +98,6 @@ local function modify(parent, region, data)

-- Get overall bounding box
local leftest, rightest, lowest, highest = 0, 0, 0, 0;
local minLevel
for index, childId in ipairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
local childRegion = WeakAuras.GetRegion(childId)
Expand All @@ -102,10 +107,6 @@ local function modify(parent, region, data)
rightest = math.max(rightest, trx);
lowest = math.min(lowest, bly);
highest = math.max(highest, try);
local frameLevel = childRegion and childRegion:GetFrameLevel()
if frameLevel then
minLevel = minLevel and math.min(minLevel, frameLevel) or frameLevel
end
end
end
region.blx = leftest;
Expand Down Expand Up @@ -154,9 +155,6 @@ local function modify(parent, region, data)
border:ClearAllPoints();
border:SetPoint("bottomleft", region, "bottomleft", leftest-data.borderOffset, lowest-data.borderOffset);
border:SetPoint("topright", region, "topright", rightest+data.borderOffset, highest+data.borderOffset);
if minLevel then
border:SetFrameLevel(minLevel - 1)
end
border:Show();
else
border:Hide();
Expand Down
Loading

0 comments on commit f60e72a

Please sign in to comment.