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 = {
|
||||
|
||||
Reference in New Issue
Block a user