beta
This commit is contained in:
@@ -4,7 +4,7 @@ if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
||||
local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
|
||||
if not lib then return end
|
||||
|
||||
local pairs = pairs
|
||||
local pairs, ipairs = pairs, ipairs
|
||||
local ceil, floor, min, mod = math.ceil, math.floor, math.min, mod
|
||||
local tinsert, tremove = table.insert, table.remove
|
||||
|
||||
@@ -41,7 +41,7 @@ local FramePoolResetter = function(framePool, frame)
|
||||
end
|
||||
|
||||
if frame.textures then
|
||||
for _, texture in pairs(frame.textures) do
|
||||
for _, texture in ipairs(frame.textures) do
|
||||
GlowTexPool:Release(texture)
|
||||
end
|
||||
end
|
||||
@@ -69,8 +69,8 @@ local function addFrameAndTex(r, color, name, key, N, xOffset, yOffset, texture,
|
||||
|
||||
local f = r[name..key]
|
||||
f:SetFrameLevel(r:GetFrameLevel() + frameLevel)
|
||||
f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset + 0.05, yOffset + 0.05)
|
||||
f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset + 0.05)
|
||||
f:SetPoint("TOPLEFT", r, "TOPLEFT", -xOffset, yOffset)
|
||||
f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", xOffset, -yOffset)
|
||||
f:Show()
|
||||
|
||||
if not f.textures then
|
||||
|
||||
@@ -1060,7 +1060,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "ignoreDead",
|
||||
display = WeakAuras.newFeatureString .. L["Ignore Dead"],
|
||||
display = L["Ignore Dead"],
|
||||
type = "toggle",
|
||||
width = WeakAuras.doubleWidth,
|
||||
enable = function(trigger)
|
||||
@@ -1070,7 +1070,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "ignoreDisconnected",
|
||||
display = WeakAuras.newFeatureString .. L["Ignore Disconnected"],
|
||||
display = L["Ignore Disconnected"],
|
||||
type = "toggle",
|
||||
width = WeakAuras.doubleWidth,
|
||||
enable = function(trigger)
|
||||
@@ -1260,7 +1260,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "ignoreDead",
|
||||
display = WeakAuras.newFeatureString .. L["Ignore Dead"],
|
||||
display = L["Ignore Dead"],
|
||||
type = "toggle",
|
||||
width = WeakAuras.doubleWidth,
|
||||
enable = function(trigger)
|
||||
@@ -1270,7 +1270,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "ignoreDisconnected",
|
||||
display = WeakAuras.newFeatureString .. L["Ignore Disconnected"],
|
||||
display = L["Ignore Disconnected"],
|
||||
type = "toggle",
|
||||
width = WeakAuras.doubleWidth,
|
||||
enable = function(trigger)
|
||||
@@ -1468,7 +1468,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "ignoreDead",
|
||||
display = WeakAuras.newFeatureString .. L["Ignore Dead"],
|
||||
display = L["Ignore Dead"],
|
||||
type = "toggle",
|
||||
width = WeakAuras.doubleWidth,
|
||||
enable = function(trigger)
|
||||
@@ -1478,7 +1478,7 @@ WeakAuras.event_prototypes = {
|
||||
},
|
||||
{
|
||||
name = "ignoreDisconnected",
|
||||
display = WeakAuras.newFeatureString .. L["Ignore Disconnected"],
|
||||
display = L["Ignore Disconnected"],
|
||||
type = "toggle",
|
||||
width = WeakAuras.doubleWidth,
|
||||
enable = function(trigger)
|
||||
|
||||
@@ -31,7 +31,7 @@ local default = {
|
||||
zoom = 0,
|
||||
keepAspectRatio = false,
|
||||
frameStrata = 1,
|
||||
|
||||
cooldown = false,
|
||||
cooldownEdge = false,
|
||||
subRegions = {}
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ local default = function(parentType)
|
||||
glowYOffset = 0,
|
||||
}
|
||||
if parentType == "aurabar" then
|
||||
options["glowType"] = "Pixel"
|
||||
options["glow_anchor"] = "bar"
|
||||
end
|
||||
return options
|
||||
@@ -345,6 +346,7 @@ local function modify(parent, region, parentData, data, first)
|
||||
region:SetScript("OnSizeChanged", region.UpdateSize)
|
||||
end
|
||||
|
||||
-- This is used by the templates to add glow
|
||||
function WeakAuras.getDefaultGlow(regionType)
|
||||
if regionType == "aurabar" then
|
||||
return {
|
||||
@@ -387,4 +389,24 @@ local function supports(regionType)
|
||||
or regionType == "aurabar"
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subglow", L["Glow"], supports, create, modify, onAcquire, onRelease, default, nil, properties);
|
||||
local function addDefaultsForNewAura(data)
|
||||
if data.regionType == "icon" then
|
||||
tinsert(data.subRegions, {
|
||||
["type"] = "subglow",
|
||||
glow = false,
|
||||
useGlowColor = false,
|
||||
glowColor = {1, 1, 1, 1},
|
||||
glowType = "buttonOverlay",
|
||||
glowLines = 8,
|
||||
glowFrequency = 0.25,
|
||||
glowLength = 10,
|
||||
glowThickness = 1,
|
||||
glowScale = 1,
|
||||
glowBorder = false,
|
||||
glowXOffset = 0,
|
||||
glowYOffset = 0,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
WeakAuras.RegisterSubRegionType("subglow", L["Glow"], supports, create, modify, onAcquire, onRelease, default, addDefaultsForNewAura, properties);
|
||||
|
||||
+4
-4
@@ -806,15 +806,15 @@ WeakAuras.anchor_frame_types = {
|
||||
SCREEN = L["Screen/Parent Group"],
|
||||
MOUSE = L["Mouse Cursor"],
|
||||
SELECTFRAME = L["Select Frame"],
|
||||
UNITFRAME = WeakAuras.newFeatureString..L["Unit Frames"],
|
||||
CUSTOM = WeakAuras.newFeatureString..L["Custom"]
|
||||
UNITFRAME = L["Unit Frames"],
|
||||
CUSTOM = L["Custom"]
|
||||
}
|
||||
|
||||
WeakAuras.anchor_frame_types_group = {
|
||||
SCREEN = L["Screen/Parent Group"],
|
||||
MOUSE = L["Mouse Cursor"],
|
||||
SELECTFRAME = L["Select Frame"],
|
||||
CUSTOM = WeakAuras.newFeatureString..L["Custom"]
|
||||
CUSTOM = L["Custom"]
|
||||
}
|
||||
|
||||
WeakAuras.spark_rotation_types = {
|
||||
@@ -2310,7 +2310,7 @@ WeakAuras.author_option_types = {
|
||||
space = L["Space"],
|
||||
multiselect = L["Toggle List"],
|
||||
header = L["Separator"],
|
||||
group = WeakAuras.newFeatureString .. L["Option Group"],
|
||||
group = L["Option Group"],
|
||||
}
|
||||
|
||||
WeakAuras.author_option_fields = {
|
||||
|
||||
@@ -659,7 +659,7 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
|
||||
ignoreDead = {
|
||||
type = "toggle",
|
||||
name = WeakAuras.newFeatureString .. L["Ignore Dead"],
|
||||
name = L["Ignore Dead"],
|
||||
order = 68.7,
|
||||
width = WeakAuras.doubleWidth,
|
||||
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end
|
||||
@@ -667,14 +667,14 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
|
||||
ignoreDisconnected = {
|
||||
type = "toggle",
|
||||
name = WeakAuras.newFeatureString .. L["Ignore Disconnected"],
|
||||
name = L["Ignore Disconnected"],
|
||||
order = 68.8,
|
||||
width = WeakAuras.doubleWidth,
|
||||
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) end
|
||||
},
|
||||
ignoreInvisible = {
|
||||
type = "toggle",
|
||||
name = WeakAuras.newFeatureString .. L["Ignore out of checking range"],
|
||||
name = L["Ignore out of checking range"],
|
||||
desc = L["Uses UnitIsVisible() to check if in range. This is polled every second."],
|
||||
order = 68.9,
|
||||
width = WeakAuras.doubleWidth,
|
||||
|
||||
@@ -1188,7 +1188,7 @@ local function BorderOptions(id, data, showBackDropOptions, hiddenFunc, order)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Border Size"],
|
||||
order = order + 0.4,
|
||||
softMin = 1,
|
||||
min = 1,
|
||||
softMax = 64,
|
||||
bigStep = 1,
|
||||
hidden = function() return hiddenFunc and hiddenFunc() or not data.border end,
|
||||
|
||||
@@ -80,7 +80,7 @@ local function createOptions(id, data)
|
||||
groupIcon = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = WeakAuras.newFeatureString..L["Group Icon"],
|
||||
name = L["Group Icon"],
|
||||
desc = L["Set Thumbnail Icon"],
|
||||
order = 0.5,
|
||||
get = function()
|
||||
@@ -122,7 +122,7 @@ local function createOptions(id, data)
|
||||
type = "toggle",
|
||||
order = 1.5,
|
||||
width = WeakAuras.normalWidth,
|
||||
name = WeakAuras.newFeatureString..L["Group by Frame"],
|
||||
name = L["Group by Frame"],
|
||||
desc = L[
|
||||
[[Group and anchor each auras by frame.
|
||||
|
||||
@@ -134,7 +134,7 @@ local function createOptions(id, data)
|
||||
anchorPerUnit = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = WeakAuras.newFeatureString..L["Group by Frame"],
|
||||
name = L["Group by Frame"],
|
||||
order = 1.6,
|
||||
values = {
|
||||
["UNITFRAME"] = L["Unit Frames"],
|
||||
|
||||
@@ -62,7 +62,7 @@ local function createOptions(id, data)
|
||||
groupIcon = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = WeakAuras.newFeatureString..L["Group Icon"],
|
||||
name = L["Group Icon"],
|
||||
desc = L["Set Thumbnail Icon"],
|
||||
order = 0.50,
|
||||
get = function()
|
||||
|
||||
@@ -64,7 +64,7 @@ local function createOptions(parentData, data, index, subIndex)
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Border Size"],
|
||||
order = 6,
|
||||
softMin = 1,
|
||||
min = 1,
|
||||
softMax = 64,
|
||||
bigStep = 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user