from retail

This commit is contained in:
Bunny67
2020-06-09 23:31:40 +03:00
parent 7a5876526d
commit de72394bda
32 changed files with 313 additions and 291 deletions
+29 -12
View File
@@ -696,11 +696,6 @@ local function UpdateStateWithNoMatch(time, triggerStates, triggerInfo, cloneId,
changed = true
end
if state.tooltip or state.tooltip1 or state.tooltip2 or state.tooltip3 then
state.tooltip, state.tooltip1, state.tooltip2, state.tooltip3 = nil, nil, nil, nil
changed = true
end
if state.matchCount ~= matchCount then
state.matchCount = matchCount
changed = true
@@ -867,10 +862,18 @@ local function TriggerInfoApplies(triggerInfo, unit)
return false
end
if triggerInfo.ignoreDead and UnitIsDeadOrGhost(unit) then
return false
end
if triggerInfo.ignoreDisconnected and not UnitIsConnected(unit) then
return false
end
if triggerInfo.unit == "group" and triggerInfo.groupSubType == "party" then
if IsInRaid() then
-- Filter our player/party# while in raid and keep only raid units that are correct
if not WeakAuras.multiUnitUnits.raid[unit] or not UnitIsUnit("player", unit) then
if unit:sub(1,4) ~= "raid" or not UnitIsUnit("player", unit) then
return false
end
else
@@ -881,11 +884,11 @@ local function TriggerInfoApplies(triggerInfo, unit)
end
-- Filter our player/party# while in raid
if (triggerInfo.unit == "group" and triggerInfo.groupSubType == "group" and IsInRaid() and not WeakAuras.multiUnitUnits.raid[unit]) then
if (triggerInfo.unit == "group" and triggerInfo.groupSubType == "group" and IsInRaid() and unit:sub(1,4) ~= "raid") then
return false
end
if triggerInfo.unit == "group" and triggerInfo.groupSubType == "raid" and not WeakAuras.multiUnitUnits.raid[unit] then
if triggerInfo.unit == "group" and triggerInfo.groupSubType == "raid" and unit:sub(1,4) ~= "raid" then
return false
end
@@ -1353,13 +1356,13 @@ end
local function ScanUnit(time, arg1)
if not arg1 then return end
if (WeakAuras.multiUnitUnits.raid[arg1] and IsInRaid()) then
if (arg1:sub(1,4) == "raid" and IsInRaid()) then
ScanGroupUnit(time, matchDataChanged, "group", arg1)
elseif (WeakAuras.multiUnitUnits.party[arg1] and not IsInRaid()) then
elseif ((arg1:sub(1,5) == "party" or arg1 == "player") and not IsInRaid()) then
ScanGroupUnit(time, matchDataChanged, "group", arg1)
elseif WeakAuras.multiUnitUnits.boss[arg1] then
elseif arg1:sub(1,4) == "boss" then
ScanGroupUnit(time, matchDataChanged, "boss", arg1)
elseif WeakAuras.multiUnitUnits.arena[arg1] then
elseif arg1:sub(1,5) == "arena" then
ScanGroupUnit(time, matchDataChanged, "arena", arg1)
else
ScanGroupUnit(time, matchDataChanged, nil, arg1)
@@ -1503,6 +1506,14 @@ local function EventHandler(frame, event, arg1, arg2, ...)
tinsert(unitsToRemove, unit)
end
end
elseif event == "UNIT_FLAGS" then
if arg1:sub(1,4) == "raid" or arg1:sub(1, 5) == "party" or arg1 == "player" then
RecheckActiveForUnitType("group", arg1, deactivatedTriggerInfos)
end
elseif event == "PLAYER_FLAGS_CHANGED" then
if arg1:sub(1,4) == "raid" or arg1:sub(1, 5) == "party" or arg1 == "player" then
RecheckActiveForUnitType("group", arg1, deactivatedTriggerInfos)
end
elseif event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE" then
if arg1 == "player" then
ScanGroupUnit(time, matchDataChanged, nil, "vehicle")
@@ -1530,6 +1541,8 @@ local function EventHandler(frame, event, arg1, arg2, ...)
end
frame:RegisterEvent("UNIT_AURA")
frame:RegisterEvent("UNIT_FLAGS")
frame:RegisterEvent("PLAYER_FLAGS_CHANGED")
frame:RegisterEvent("UNIT_PET")
frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
@@ -2104,6 +2117,8 @@ function BuffTrigger.Add(data)
local groupTrigger = trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
local effectiveIgnoreSelf = groupTrigger and trigger.ignoreSelf
local effectiveClass = groupTrigger and trigger.useClass and trigger.class
local effectiveIgnoreDead = groupTrigger and trigger.ignoreDead
local effectiveIgnoreDisconnected = groupTrigger and trigger.ignoreDisconnected
if trigger.unit == "multi" then
BuffTrigger.InitMultiAura()
@@ -2154,6 +2169,8 @@ function BuffTrigger.Add(data)
fetchTooltip = not IsSingleMissing(trigger) and trigger.unit ~= "multi" and trigger.fetchTooltip,
groupTrigger = IsGroupTrigger(trigger),
ignoreSelf = effectiveIgnoreSelf,
ignoreDead = effectiveIgnoreDead,
ignoreDisconnected = effectiveIgnoreDisconnected,
groupSubType = groupSubType,
groupCountFunc = groupCountFunc,
class = effectiveClass,
+33 -31
View File
@@ -388,11 +388,13 @@ local function callFunctionForActivateEvent(func, trigger, fallback, errorHandle
return fallback
end
local ok, value = pcall(func, trigger)
if not ok then
errorHandler(value)
return fallback
else
if ok and value then
return value
else
if not ok then
errorHandler(value)
end
return fallback
end
end
@@ -804,6 +806,11 @@ function GenericTrigger.ScanWithFakeEvent(id, fake)
end
updateTriggerState = RunTriggerFunc(allStates, events[id][triggernum], id, triggernum, eventName) or updateTriggerState;
end
for unit, unitData in pairs(event.unit_events) do
for _, event in ipairs(unitData) do
updateTriggerState = RunTriggerFunc(allStates, events[id][triggernum], id, triggernum, event, unit) or updateTriggerState
end
end
end
end
end
@@ -855,7 +862,7 @@ function HandleUnitEvent(frame, event, unit, ...)
WeakAuras.StartProfileSystem("generictrigger " .. event .. " " .. unit);
if not(WeakAuras.IsPaused()) then
if (UnitIsUnit(unit, frame.unit)) then
WeakAuras.ScanUnitEvents(event, unit, ...);
WeakAuras.ScanUnitEvents(event, frame.unit, ...);
end
end
WeakAuras.StopProfileSystem("generictrigger " .. event .. " " .. unit);
@@ -1227,9 +1234,6 @@ function GenericTrigger.Add(data, region)
triggerFunc = WeakAuras.LoadFunction("return "..(trigger.custom or ""), id);
if (trigger.custom_type == "stateupdate") then
tsuConditionVariables = WeakAuras.LoadFunction("return function() return \n" .. (trigger.customVariables or "") .. "\n end");
if not tsuConditionVariables then
tsuConditionVariables = function() return end
end
end
if(trigger.custom_type == "status" or trigger.custom_type == "event" and trigger.custom_hide == "custom") then
@@ -1753,11 +1757,9 @@ do
swingTimerFrame:RegisterEvent("PLAYER_ENTER_COMBAT");
swingTimerFrame:RegisterEvent("UNIT_ATTACK_SPEED");
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
if WeakAuras.IsClassic() then
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_START")
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_FAILED")
end
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_START")
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_FAILED")
swingTimerFrame:SetScript("OnEvent",
function(_, event, ...)
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
@@ -3670,47 +3672,47 @@ function GenericTrigger.CreateFallbackState(data, triggernum, state)
WeakAuras.ActivateAuraEnvironment(data.id, "", state);
local firstTrigger = data.triggers[1].trigger
if (event.nameFunc) then
local success, res = pcall(event.nameFunc, firstTrigger);
if not success then
geterrorhandler()(res)
local ok, name = pcall(event.nameFunc, firstTrigger);
if not ok then
geterrorhandler()(name)
state.name = nil
else
state.name = res or nil
state.name = name or nil
end
end
if (event.iconFunc) then
local success, res = pcall(event.iconFunc, firstTrigger);
if not success then
geterrorhandler()(res)
local ok, icon = pcall(event.iconFunc, firstTrigger);
if not ok then
geterrorhandler()(icon)
state.icon = nil
else
state.icon = res or nil
state.icon = icon or nil
end
end
if (event.textureFunc ) then
local success, res = pcall(event.textureFunc, firstTrigger);
if not success then
geterrorhandler()(res)
local ok, texture = pcall(event.textureFunc, firstTrigger);
if not ok then
geterrorhandler()(texture)
state.texture = nil
else
state.texture = res or nil
state.texture = texture or nil
end
end
if (event.stacksFunc) then
local success, res = pcall(event.stacksFunc, firstTrigger);
if not success then
geterrorhandler()(res)
local ok, stacks = pcall(event.stacksFunc, firstTrigger);
if not ok then
geterrorhandler()(stacks)
state.stacks = nil
else
state.stacks = res or nil
state.stacks = stacks or nil
end
end
if (event.durationFunc) then
local success, arg1, arg2, arg3, inverse = pcall(event.durationFunc, firstTrigger);
if not success then
local ok, arg1, arg2, arg3, inverse = pcall(event.durationFunc, firstTrigger);
if not ok then
geterrorhandler()(arg1)
state.progressType = "timed";
state.duration = 0;
+4 -4
View File
@@ -7,8 +7,8 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
local versionString = "2.17.4"
local buildTime = "20200422171414"
local versionString = "2.17.5"
local buildTime = "20200511190745"
WeakAuras.versionString = versionStringFromToc
WeakAuras.buildTime = buildTime
@@ -39,7 +39,7 @@ end
WeakAuras.PowerAurasPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\"
WeakAuras.PowerAurasSoundPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Sounds\\"
-- force enable WeakAurasCompanion and Archive because some addon managers interfere with it
-- Force enable WeakAurasCompanion and Archive because some addon managers interfere with it
EnableAddOn("WeakAurasCompanion")
EnableAddOn("WeakAurasArchive")
@@ -62,7 +62,7 @@ end
function WeakAuras.StopProfileAura()
end
-- if weakauras shuts down due to being installed on the wrong target, keep the bindings from erroring
-- If WeakAuras shuts down due to being installed on the wrong target, keep the bindings from erroring
function WeakAuras.StartProfile()
end
@@ -1,5 +1,5 @@
local MAJOR_VERSION = "LibGetFrame-1.0"
local MINOR_VERSION = 9
local MINOR_VERSION = 20
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then return end
@@ -48,25 +48,30 @@ local defaultPlayerFrames = {
"SUFUnitplayer",
"PitBull4_Frames_Player",
"ElvUF_Player",
"oUF_TukuiPlayer",
"oUF_.-Player",
"oUF_PlayerPlate",
"PlayerFrame",
}
local defaultTargetFrames = {
"SUFUnittarget",
"PitBull4_Frames_Target",
"ElvUF_Target",
"oUF_.-Target",
"TargetFrame",
"oUF_TukuiTarget",
}
local defaultTargettargetFrames = {
"SUFUnittargetarget",
"PitBull4_Frames_Target's target",
"ElvUF_TargetTarget",
"oUF_.-TargetTarget",
"oUF_ToT",
"TargetTargetFrame",
"oUF_TukuiTargetTarget",
}
local GetFramesCache = {}
local FrameToUnitFresh = {}
local FrameToUnit = {}
local UpdatedFrames = {}
local function ScanFrames(depth, frame, ...)
if not frame then return end
@@ -83,6 +88,11 @@ local function ScanFrames(depth, frame, ...)
local name = frame:GetName()
if unit and frame:IsVisible() and name then
GetFramesCache[frame] = name
if unit ~= FrameToUnit[frame] then
FrameToUnit[frame] = unit
UpdatedFrames[frame] = unit
end
FrameToUnitFresh[frame] = unit
end
end
end
@@ -90,18 +100,31 @@ local function ScanFrames(depth, frame, ...)
end
local wait = false
local function doScanForUnitFrames()
wait = false
wipe(UpdatedFrames)
wipe(GetFramesCache)
wipe(FrameToUnitFresh)
ScanFrames(0, UIParent)
callbacks:Fire("GETFRAME_REFRESH")
for frame, unit in pairs(UpdatedFrames) do
callbacks:Fire("FRAME_UNIT_UPDATE", frame, unit)
end
for frame, unit in pairs(FrameToUnit) do
if FrameToUnitFresh[frame] ~= unit then
callbacks:Fire("FRAME_UNIT_REMOVED", frame, unit)
FrameToUnit[frame] = nil
end
end
end
local function ScanForUnitFrames(noDelay)
if noDelay then
wipe(GetFramesCache)
ScanFrames(0, UIParent)
callbacks:Fire("GETFRAME_REFRESH")
doScanForUnitFrames()
elseif not wait then
wait = true
C_Timer.After(1, function()
wipe(GetFramesCache)
ScanFrames(0, UIParent)
wait = false
callbacks:Fire("GETFRAME_REFRESH")
doScanForUnitFrames()
end)
end
end
@@ -157,7 +180,9 @@ local defaultOptions = {
targetFrames = defaultTargetFrames,
targettargetFrames = defaultTargettargetFrames,
ignoreFrames = {
"PitBull4_Frames_Target's target's target"
"PitBull4_Frames_Target's target's target",
"ElvUF_PartyGroup%dUnitButton%dTarget",
"RavenButton"
},
returnAll = false,
}
+1 -1
View File
@@ -96,7 +96,7 @@ local properties = {
min = 1,
softMax = screenWidth,
bigStep = 1,
defautl = 32,
default = 32,
},
height = {
display = L["Height"],
+3 -3
View File
@@ -163,7 +163,7 @@ end
local sortNilFirst = WeakAuras.InvertSort(WeakAuras.SortNilLast)
function WeakAuras.SortNilFirst(a, b)
if a == nil and b == nil then
-- we want SortNil to always prevent nils from propogating
-- we want SortNil to always prevent nils from propagating
-- as well as to sort nils onto one side
-- to maintain stability, we need SortNil(nil, nil) to always be false
-- hence this special case
@@ -778,8 +778,8 @@ local function modify(parent, region, data)
end
function region:Suspend()
-- Stops group from repositioning and reindexing children
-- Calls to Activate, Deactivate, and Reindex will cache the relevant children
-- Stops group from repositioning and re-indexing children
-- Calls to Activate, Deactivate, and Re-index will cache the relevant children
-- Similarly, Sort, Position, and Resize will be stopped
-- to be called on the next Resume
-- for when the group is resumed
+2 -2
View File
@@ -133,9 +133,9 @@ local function AcquireModel(region, data)
-- Enable model animation
if(data.advance) then
local elapsed = 0;
model:SetScript("OnUpdate", function(self, e)
model:SetScript("OnUpdate", function(self, elaps)
WeakAuras.StartProfileSystem("model");
elapsed = elapsed + (e * 1000);
elapsed = elapsed + (elaps * 1000);
model:SetSequenceTime(data.sequence, elapsed);
WeakAuras.StopProfileSystem("model");
end)
+12 -12
View File
@@ -52,12 +52,12 @@ end
-- Adjusted Duration
function WeakAuras.regionPrototype.AddAdjustedDurationToDefault(default)
default.useAdjustededMax = false;
default.useAdjustededMin = false;
default.useAdjustedMax = false;
default.useAdjustedMin = false;
end
function WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, order)
options.useAdjustededMin = {
options.useAdjustedMin = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Set Minimum Progress"],
@@ -83,7 +83,7 @@ function WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, ord
hidden = function() return not (not data.useAdjustededMin and data.useAdjustededMax) end,
};
options.useAdjustededMax = {
options.useAdjustedMax = {
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Set Maximum Progress"],
@@ -505,9 +505,9 @@ function WeakAuras.regionPrototype.modify(parent, region, data)
if (defaultsForRegion and defaultsForRegion.alpha) then
region:SetRegionAlpha(data.alpha);
end
local hasAdjustedMin = defaultsForRegion and defaultsForRegion.useAdjustededMin ~= nil and data.useAdjustededMin
local hasAdjustedMin = defaultsForRegion and defaultsForRegion.useAdjustedMin ~= nil and data.useAdjustededMin
and data.adjustedMin;
local hasAdjustedMax = defaultsForRegion and defaultsForRegion.useAdjustededMax ~= nil and data.useAdjustededMax
local hasAdjustedMax = defaultsForRegion and defaultsForRegion.useAdjustedMax ~= nil and data.useAdjustededMax
and data.adjustedMax;
region.adjustedMin = nil
@@ -707,8 +707,8 @@ end
-- Expand/Collapse function
function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parentRegionType)
local id = data.id
local indynamicgroup = parentRegionType == "dynamicgroup";
local ingroup = parentRegionType == "group";
local inDynamicGroup = parentRegionType == "dynamicgroup";
local inGroup = parentRegionType == "group";
local startMainAnimation = function()
WeakAuras.Animate("display", data, "main", data.animation.main, region, false, nil, true, cloneId);
@@ -730,7 +730,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
end
local hideRegion;
if(indynamicgroup) then
if(inDynamicGroup) then
hideRegion = function()
if region.PreHide then
region:PreHide()
@@ -761,7 +761,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
end
end
if(indynamicgroup) then
if(inDynamicGroup) then
function region:Collapse()
if (not region.toShow) then
return;
@@ -816,7 +816,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
hideRegion();
end
if ingroup then
if inGroup then
parent:UpdateBorder(region);
end
@@ -853,7 +853,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
startMainAnimation();
end
if ingroup then
if inGroup then
parent:UpdateBorder(region);
end
+3 -3
View File
@@ -91,7 +91,7 @@ local function animRotate(object, degrees, anchor)
end
-- Something to rotate
if object.animationGroup or degrees ~= 0 then
-- Create AnimatioGroup and rotation animation
-- Create AnimationGroup and rotation animation
object.animationGroup = object.animationGroup or object:CreateAnimationGroup();
local group = object.animationGroup;
group.rotate = group.rotate or group:CreateAnimation("rotation");
@@ -150,8 +150,8 @@ local function create()
-- WOW's layout system works best if frames and all their parents are anchored
-- In this case, it appears that a text doesn't get the right size on the initial
-- load with a custom font. (Though it works if the font is non-custom or after
-- a reloadui). Just moving the normal AnchorSubRegion to the start of modify was not enough
-- But anchoring the text to UIParent before reanchoring it correctly does seem to fix
-- a ReloadUI). Just moving the normal AnchorSubRegion to the start of modify was not enough
-- But anchoring the text to UIParent before re-anchoring it correctly does seem to fix
-- the issue. Also see #1778
text:SetPoint("CENTER", UIParent, "CENTER")
+6 -6
View File
@@ -746,25 +746,25 @@ local function recurseStringify(data, level, lines)
for k, v in pairs(data) do
local lineFormat = strrep(" ", level) .. "[%s] = %s"
local form1, form2, value
local ktype, vtype = type(k), type(v)
if ktype == "string" then
local kType, vType = type(k), type(v)
if kType == "string" then
form1 = "%q"
elseif ktype == "number" then
elseif kType == "number" then
form1 = "%d"
else
form1 = "%s"
end
if vtype == "string" then
if vType == "string" then
form2 = "%q"
v = v:gsub("\\", "\\\\"):gsub("\n", "\\n"):gsub("\"", "\\\"")
elseif vtype == "boolean" then
elseif vType == "boolean" then
v = tostring(v)
form2 = "%s"
else
form2 = "%s"
end
lineFormat = lineFormat:format(form1, form2)
if vtype == "table" then
if vType == "table" then
tinsert(lines, lineFormat:format(k, "{"))
recurseStringify(v, level + 1, lines)
tinsert(lines, strrep(" ", level) .. "},")
+51 -57
View File
@@ -722,38 +722,38 @@ function WeakAuras.GetActiveConditions(id, cloneId)
return triggerState[id].activatedConditions[cloneId];
end
local function formatValueForAssignment(vtype, value, pathToCustomFunction)
local function formatValueForAssignment(vType, value, pathToCustomFunction)
if (value == nil) then
value = false;
end
if (vtype == "bool") then
if (vType == "bool") then
return value and tostring(value) or "false";
elseif(vtype == "number") then
elseif(vType == "number") then
return value and tostring(value) or "0";
elseif (vtype == "list") then
elseif (vType == "list") then
return type(value) == "string" and string.format("%q", value) or "nil";
elseif(vtype == "color") then
elseif(vType == "color") then
if (value and type(value) == "table") then
return string.format("{%s, %s, %s, %s}", tostring(value[1]), tostring(value[2]), tostring(value[3]), tostring(value[4]));
end
return "{1, 1, 1, 1}";
elseif(vtype == "chat") then
elseif(vType == "chat") then
if (value and type(value) == "table") then
return string.format("{message_type = %q, message = %q, message_dest = %q, message_channel = %q, message_custom = %s}",
tostring(value.message_type), tostring(value.message or ""),
tostring(value.message_dest), tostring(value.message_channel),
pathToCustomFunction);
end
elseif(vtype == "sound") then
elseif(vType == "sound") then
if (value and type(value) == "table") then
return string.format("{ sound = %q, sound_channel = %q, sound_path = %q, sound_kit_id = %q, sound_type = %q, %s}",
tostring(value.sound or ""), tostring(value.sound_channel or ""), tostring(value.sound_path or ""),
tostring(value.sound_kit_id or ""), tostring(value.sound_type or ""),
value.sound_repeat and "sound_repeat = " .. tostring(value.sound_repeat) or "nil");
end
elseif(vtype == "customcode") then
elseif(vType == "customcode") then
return string.format("%s", pathToCustomFunction);
elseif vtype == "glowexternal" then
elseif vType == "glowexternal" then
if (value and type(value) == "table") then
return ([[{ glow_action = %q, glow_frame_type = %q, glow_type = %q,
glow_frame = %q, use_glow_color = %s, glow_color = {%s, %s, %s, %s},
@@ -869,7 +869,7 @@ local function CreateTestForCondition(input, allConditionsTemplate, usedStates)
usedStates[trigger] = true;
local conditionTemplate = allConditionsTemplate[trigger] and allConditionsTemplate[trigger][variable];
local ctype = conditionTemplate and conditionTemplate.type;
local cType = conditionTemplate and conditionTemplate.type;
local test = conditionTemplate and conditionTemplate.test;
local stateCheck = "state[" .. trigger .. "] and state[" .. trigger .. "].show and ";
@@ -882,27 +882,27 @@ local function CreateTestForCondition(input, allConditionsTemplate, usedStates)
local opString = type(op) == "string" and "[[" .. op .. "]]" or op;
check = "state and WeakAuras.CallCustomConditionTest(" .. testFunctionNumber .. ", state[" .. trigger .. "], " .. valueString .. ", " .. (opString or "nil") .. ")";
end
elseif (ctype == "number" and op) then
elseif (cType == "number" and op) then
local v = tonumber(value)
if (v) then
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. v;
end
elseif (ctype == "timer" and op) then
elseif (cType == "timer" and op) then
if (op == "==") then
check = stateCheck .. stateVariableCheck .. "abs(state[" .. trigger .. "]." ..variable .. "- now -" .. value .. ") < 0.05";
else
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. "- now" .. op .. value;
end
elseif (ctype == "select" and op) then
elseif (cType == "select" and op) then
if (tonumber(value)) then
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. tonumber(value);
else
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. "'" .. value .. "'";
end
elseif (ctype == "bool") then
elseif (cType == "bool") then
local rightSide = value == 0 and "false" or "true";
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. "==" .. rightSide
elseif (ctype == "string") then
elseif (cType == "string") then
if(op == "==") then
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. " == [[" .. value .. "]]";
elseif (op == "find('%s')") then
@@ -912,7 +912,7 @@ local function CreateTestForCondition(input, allConditionsTemplate, usedStates)
end
end
if (ctype == "timer" and value) then
if (cType == "timer" and value) then
recheckCode = " nextTime = state[" .. trigger .. "] and state[" .. trigger .. "]." .. variable .. " and (state[" .. trigger .. "]." .. variable .. " -" .. value .. ")\n";
recheckCode = recheckCode .. " if (nextTime and (not recheckTime or nextTime < recheckTime) and nextTime >= now) then\n"
recheckCode = recheckCode .. " recheckTime = nextTime\n";
@@ -1339,8 +1339,8 @@ end
function WeakAuras.RegisterForGlobalConditions(id)
local data = WeakAuras.GetData(id);
for event, conditonFunctions in pairs(dynamicConditions) do
conditonFunctions.id = nil;
for event, conditionFunctions in pairs(dynamicConditions) do
conditionFunctions.id = nil;
end
local register = {};
@@ -1462,9 +1462,9 @@ WeakAuras.frames["LDB Tooltip Updater"] = tooltip_update_frame;
local function getAnchors(frame)
local x, y = frame:GetCenter()
if not x or not y then return "CENTER" end
local hhalf = (x > UIParent:GetWidth()*2/3) and "RIGHT" or (x < UIParent:GetWidth()/3) and "LEFT" or ""
local vhalf = (y > UIParent:GetHeight()/2) and "TOP" or "BOTTOM"
return vhalf..hhalf, frame, (vhalf == "TOP" and "BOTTOM" or "TOP")..hhalf
local hHalf = (x > UIParent:GetWidth()*2/3) and "RIGHT" or (x < UIParent:GetWidth()/3) and "LEFT" or ""
local vHalf = (y > UIParent:GetHeight()/2) and "TOP" or "BOTTOM"
return vHalf..hHalf, frame, (vHalf == "TOP" and "BOTTOM" or "TOP")..hHalf
end
local Broker_WeakAuras;
@@ -3709,7 +3709,7 @@ function WeakAuras.SyncParentChildRelationships(silent)
-- 1. Find all auras where data.parent ~= nil or data.controlledChildren ~= nil
-- If an aura has both, then remove data.parent
-- If an aura has data.parent which doesn't exist, then remove data.parent
-- If an aura has data.parent which doesn't have data.controledChildren, then remove data.parent
-- If an aura has data.parent which doesn't have data.controlledChildren, then remove data.parent
-- 2. For each aura with data.controlledChildren, iterate through the list of children and remove entries where:
-- The child doesn't exist in the database
-- The child ID is duplicated in data.controlledChildren (only the first will be kept)
@@ -4448,9 +4448,10 @@ function WeakAuras.ReleaseClone(id, cloneId, regionType)
clonePool[regionType][#clonePool[regionType] + 1] = region;
end
function WeakAuras.HandleChatAction(message_type, message, message_dest, message_channel, r, g, b, region, customFunc)
function WeakAuras.HandleChatAction(message_type, message, message_dest, message_channel, r, g, b, region, customFunc, when)
local useHiddenStates = when == "finish"
if (message:find('%%')) then
message = WeakAuras.ReplacePlaceHolders(message, region, customFunc);
message = WeakAuras.ReplacePlaceHolders(message, region, customFunc, useHiddenStates);
end
if(message_type == "PRINT") then
DEFAULT_CHAT_FRAME:AddMessage(message, r or 1, g or 1, b or 1);
@@ -4466,23 +4467,13 @@ function WeakAuras.HandleChatAction(message_type, message, message_dest, message
pcall(function() SendChatMessage(message, "WHISPER", nil, message_dest) end);
end
end
elseif(message_type == "CHANNEL") then
local channel = message_channel and tonumber(message_channel);
if(GetChannelName(channel)) then
pcall(function() SendChatMessage(message, "CHANNEL", nil, channel) end);
end
elseif(message_type == "SMARTRAID") then
local isInstanceGroup = IsInGroup(LE_PARTY_CATEGORY_INSTANCE)
if UnitInBattleground("player") then
pcall(function() SendChatMessage(message, "CHAT_MSG_BATTLEGROUND") end)
elseif UnitInRaid("player") then
pcall(function() SendChatMessage(message, "RAID") end)
elseif UnitInParty("player") then
if isInstanceGroup then
pcall(function() SendChatMessage(message, "CHAT_MSG_BATTLEGROUND") end)
else
pcall(function() SendChatMessage(message, "PARTY") end)
end
pcall(function() SendChatMessage(message, "PARTY") end)
else
if IsInInstance() then
pcall(function() SendChatMessage(message, "SAY") end)
@@ -4695,7 +4686,7 @@ function WeakAuras.PerformActions(data, when, region)
if(actions.do_message and actions.message_type and actions.message) then
local customFunc = WeakAuras.customActionsFunctions[data.id][when .. "_message"];
WeakAuras.HandleChatAction(actions.message_type, actions.message, actions.message_dest, actions.message_channel, actions.r, actions.g, actions.b, region, customFunc);
WeakAuras.HandleChatAction(actions.message_type, actions.message, actions.message_dest, actions.message_channel, actions.r, actions.g, actions.b, region, customFunc, when);
end
if (actions.stop_sound) then
@@ -5899,11 +5890,12 @@ local function evaluateTriggerStateTriggers(id)
result = true;
else
if (triggerState[id].disjunctive == "custom" and triggerState[id].triggerLogicFunc) then
local ok
ok, result = pcall(triggerState[id].triggerLogicFunc, triggerState[id].triggers);
local ok, returnValue = pcall(triggerState[id].triggerLogicFunc, triggerState[id].triggers);
if not ok then
geterrorhandler()(result)
geterrorhandler()(returnValue)
result = false
else
result = returnValue
end
end
end
@@ -6121,7 +6113,7 @@ local function ReplaceValuePlaceHolders(textStr, region, customFunc, state)
end
-- States:
-- 0 Normal state, text is just appened to result. Can transition to percent start state 1 via %
-- 0 Normal state, text is just appended to result. Can transition to percent start state 1 via %
-- 1 Percent start state, entered via %. Can transition to via { to braced, via % to normal, AZaz09 to percent rest state
-- 2 Percent rest state, stay in it via AZaz09, transition to normal on anything else
-- 3 Braced state, } transitions to normal, everything else stay in braced state
@@ -6233,31 +6225,33 @@ function WeakAuras.ContainsAnyPlaceHolders(textStr)
return ContainsPlaceHolders(textStr, function(symbol) return true end)
end
local function ValueForSymbol(symbol, region, customFunc, regionState, regionStates)
local function ValueForSymbol(symbol, region, customFunc, regionState, regionStates, useHiddenStates)
local triggerNum, sym = string.match(symbol, "(.+)%.(.+)")
triggerNum = triggerNum and tonumber(triggerNum)
if triggerNum and sym then
if regionStates and regionStates[triggerNum] then
if regionStates[triggerNum][sym] then
return tostring(regionStates[triggerNum][sym]) or ""
else
local value = ReplaceValuePlaceHolders(sym, region, customFunc, regionStates[triggerNum]);
return value or ""
if regionStates[triggerNum] then
if (useHiddenStates or regionStates[triggerNum].show) then
if regionStates[triggerNum][sym] then
return tostring(regionStates[triggerNum][sym]) or ""
else
local value = ReplaceValuePlaceHolders(sym, region, customFunc, regionStates[triggerNum]);
return value or ""
end
end
end
return ""
elseif regionState and regionState[symbol] then
return regionState.show and tostring(regionState[symbol]) or ""
elseif regionState[symbol] then
return (useHiddenStates or regionState.show) and tostring(regionState[symbol]) or ""
else
local value = regionState and ReplaceValuePlaceHolders(symbol, region, customFunc, regionState);
local value = (useHiddenStates or regionState.show) and ReplaceValuePlaceHolders(symbol, region, customFunc, regionState);
return value or ""
end
end
function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc, useHiddenStates)
local regionValues = region.values;
local regionState = region.state;
local regionStates = region.states;
local regionState = region.state or {};
local regionStates = region.states or {};
if (not regionState and not regionValues) then
return;
end
@@ -6269,7 +6263,7 @@ function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
if (endPos == 2) then
if string.byte(textStr, 1) == 37 then
local value = ReplaceValuePlaceHolders(string.sub(textStr, 2), region, customFunc, regionState);
local value = (regionState.show or useHiddenStates) and ReplaceValuePlaceHolders(string.sub(textStr, 2), region, customFunc, regionState);
if (value) then
textStr = tostring(value);
end
@@ -6307,7 +6301,7 @@ function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
-- 0-9a-zA-Z or dot character
else -- End of variable
local symbol = string.sub(textStr, start, currentPos - 1)
result = result .. ValueForSymbol(symbol, region, customFunc, regionState, regionStates)
result = result .. ValueForSymbol(symbol, region, customFunc, regionState, regionStates, useHiddenStates)
if char == 37 then
else
@@ -6317,7 +6311,7 @@ function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
elseif state == 3 then
if char == 125 then -- } closing brace
local symbol = string.sub(textStr, start, currentPos - 1)
result = result .. ValueForSymbol(symbol, region, customFunc, regionState, regionStates)
result = result .. ValueForSymbol(symbol, region, customFunc, regionState, regionStates, useHiddenStates)
start = currentPos + 1
end
end
@@ -6446,7 +6440,7 @@ local function ensureMouseFrame()
local optionsFrame = WeakAuras.OptionsFrame();
local yOffset = (optionsFrame:GetTop() + optionsFrame:GetBottom()) / 2;
local xOffset = xPositionNextToOptions();
-- We use the top right, because the main frame usees the top right as the reference too
-- We use the top right, because the main frame uses the top right as the reference too
mouseFrame:ClearAllPoints();
mouseFrame:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", xOffset - GetScreenWidth(), yOffset - GetScreenHeight());
end
+2 -2
View File
@@ -1,7 +1,7 @@
## Interface: 80300
## Interface: 30300
## Title: WeakAuras 2
## Author: Mirrored and the WeakAuras Team
## Version: 2.17.4
## Version: 2.17.5
## Notes: A powerful, comprehensive utility for displaying graphics and information based on buffs, debuffs, and other triggers.
## Notes-esES: Potente y completa aplicación que te permitirá mostrar por pantalla múltiples diseños, basados en beneficios, perjuicios y otros activadores.
## Notes-deDE: Ein leistungsfähiges, umfassendes Addon zur grafischen Darstellung von Informationen von Auren, Cooldowns, Timern und vielem mehr.
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 80300
## Interface: 30300
## Title: WeakAuras Archive
## LoadOnDemand: 1
## SavedVariables: WeakAurasArchive
+1 -1
View File
@@ -1,4 +1,4 @@
## Interface: 80205
## Interface: 30300
## Title: WeakAuras Model Paths
## Author: Mirrored and the WeakAuras Team
## Version: 2.16.0-beta1
@@ -4,7 +4,7 @@ local tinsert, tconcat, tremove, wipe = table.insert, table.concat, table.remove
local select, pairs, next, type, unpack = select, pairs, next, type, unpack
local tostring, error = tostring, error
local Type, Version = "WeakAurasDisplayButton", 53
local Type, Version = "WeakAurasDisplayButton", 54
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -1670,7 +1670,7 @@ local methods = {
return self.frame:IsEnabled();
end,
["OnRelease"] = function(self)
self:ReleaseThumnail()
self:ReleaseThumbnail()
self:SetViewRegion();
self:Enable();
self:SetGroup();
@@ -1695,8 +1695,8 @@ local methods = {
end
if self.data.regionType ~= self.thumbnailType then
self:ReleaseThumnail()
self:AcquireThumnail()
self:ReleaseThumbnail()
self:AcquireThumbnail()
else
local option = WeakAuras.regionOptions[self.thumbnailType]
if option and option.modifyThumbnail then
@@ -1704,7 +1704,7 @@ local methods = {
end
end
end,
["ReleaseThumnail"] = function(self)
["ReleaseThumbnail"] = function(self)
if not self.hasThumbnail then
return
end
@@ -1717,7 +1717,7 @@ local methods = {
self.thumbnail = nil
end
end,
["AcquireThumnail"] = function(self)
["AcquireThumbnail"] = function(self)
if self.hasThumbnail then
return
end
@@ -2044,9 +2044,9 @@ local function Constructor()
-- Update in group icon
groupUpdate = CreateFrame("BUTTON", nil, button)
button.groupUpdate = groupUpdate
local gtex = groupUpdate:CreateTexture(nil, "OVERLAY")
gtex:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]])
gtex:SetAllPoints()
local gTex = groupUpdate:CreateTexture(nil, "OVERLAY")
gTex:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]])
gTex:SetAllPoints()
groupUpdate:SetSize(16, 16)
groupUpdate:SetPoint("BOTTOM", button, "BOTTOM")
groupUpdate:SetPoint("LEFT", icon, "RIGHT", 20, 0)
@@ -1,6 +1,6 @@
if not WeakAuras.IsCorrectVersion() then return end
local Type, Version = "WeakAurasNewButton", 23
local Type, Version = "WeakAurasNewButton", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -39,7 +39,7 @@ local methods = {
self.frame:SetScript("OnClick", func);
end,
["SetIcon"] = function(self, icon)
self:ReleaseThumnail()
self:ReleaseThumbnail()
if(type(icon) == "string" or type(icon) == "number") then
self.icon:SetTexture(icon);
self.icon:Show();
@@ -63,7 +63,7 @@ local methods = {
self.thumbnailType = regionType
end
end,
["ReleaseThumnail"] = function(self)
["ReleaseThumbnail"] = function(self)
if self.thumbnail then
local regionData = WeakAuras.regionOptions[self.thumbnailType]
if regionData and regionData.releaseThumbnail then
@@ -74,7 +74,7 @@ local methods = {
self.thumbnailType = nil
end,
["OnRelease"] = function(self)
self:ReleaseThumnail()
self:ReleaseThumbnail()
if(self.iconRegion and self.iconRegion.Hide) then
self.iconRegion:Hide();
end
@@ -2,7 +2,7 @@
ToolbarButton Widget, based on AceGUI Button
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "WeakAurasToolbarButton", 3
local Type, Version = "WeakAurasToolbarButton", 4
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
@@ -40,7 +40,7 @@ local methods = {
self:SetWidth(32)
self:SetDisabled(false)
self:SetText()
self.htex:SetVertexColor(1, 1, 1, 0.1)
self.hTex:SetVertexColor(1, 1, 1, 0.1)
end,
-- ["OnRelease"] = nil,
@@ -70,9 +70,9 @@ local methods = {
end,
["SetStrongHighlight"] = function(self, enable)
if enable then
self.htex:SetVertexColor(1, 1, 1, 0.3)
self.hTex:SetVertexColor(1, 1, 1, 0.3)
else
self.htex:SetVertexColor(1, 1, 1, 0.1)
self.hTex:SetVertexColor(1, 1, 1, 0.1)
end
end
@@ -105,24 +105,24 @@ local function Constructor()
text:SetPoint("BOTTOMRIGHT", -4, 1)
text:SetJustifyV("MIDDLE")
--local ntex = frame:CreateTexture()
--ntex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
--ntex:SetTexCoord(0, 0.625, 0, 0.6875)
--ntex:SetAllPoints()
--frame:SetNormalTexture(ntex)
--local nTex = frame:CreateTexture()
--nTex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
--nTex:SetTexCoord(0, 0.625, 0, 0.6875)
--nTex:SetAllPoints()
--frame:SetNormalTexture(nTex)
local htex = frame:CreateTexture()
htex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
htex:SetVertexColor(1, 1, 1, 0.1)
local hTex = frame:CreateTexture()
hTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
hTex:SetVertexColor(1, 1, 1, 0.1)
htex:SetAllPoints()
frame:SetHighlightTexture(htex)
hTex:SetAllPoints()
frame:SetHighlightTexture(hTex)
local ptex = frame:CreateTexture()
ptex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
ptex:SetVertexColor(1, 1, 1, 0.2)
ptex:SetAllPoints()
frame:SetPushedTexture(ptex)
local pTex = frame:CreateTexture()
pTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
pTex:SetVertexColor(1, 1, 1, 0.2)
pTex:SetAllPoints()
frame:SetPushedTexture(pTex)
local widget = {
@@ -130,7 +130,7 @@ local function Constructor()
icon = icon,
frame = frame,
type = Type,
htex = htex
hTex = hTex
}
for method, func in pairs(methods) do
widget[method] = func
+7 -23
View File
@@ -102,7 +102,7 @@ function WeakAuras.AddActionOption(id, data)
name = "",
order = 3,
image = function() return "", 0, 0 end,
hidden = function() return not(data.actions.start.message_type == "WHISPER" or data.actions.start.message_type == "CHANNEL" or data.actions.start.message_type == "COMBAT" or data.actions.start.message_type == "PRINT") end
hidden = function() return not(data.actions.start.message_type == "WHISPER" or data.actions.start.message_type == "COMBAT" or data.actions.start.message_type == "PRINT") end
},
start_message_color = {
type = "color",
@@ -127,14 +127,6 @@ function WeakAuras.AddActionOption(id, data)
disabled = function() return not data.actions.start.do_message end,
hidden = function() return data.actions.start.message_type ~= "WHISPER" end
},
start_message_channel = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Channel Number"],
order = 4,
disabled = function() return not data.actions.start.do_message end,
hidden = function() return data.actions.start.message_type ~= "CHANNEL" end
},
start_message = {
type = "input",
width = WeakAuras.doubleWidth,
@@ -489,7 +481,7 @@ function WeakAuras.AddActionOption(id, data)
name = "",
order = 23,
image = function() return "", 0, 0 end,
hidden = function() return not(data.actions.finish.message_type == "WHISPER" or data.actions.finish.message_type == "CHANNEL") end
hidden = function() return data.actions.finish.message_type ~= "WHISPER" end
},
finish_message_color = {
type = "color",
@@ -514,14 +506,6 @@ function WeakAuras.AddActionOption(id, data)
disabled = function() return not data.actions.finish.do_message end,
hidden = function() return data.actions.finish.message_type ~= "WHISPER" end
},
finish_message_channel = {
type = "input",
width = WeakAuras.normalWidth,
name = L["Channel Number"],
order = 24,
disabled = function() return not data.actions.finish.do_message end,
hidden = function() return data.actions.finish.message_type ~= "CHANNEL" end
},
finish_message = {
type = "input",
width = WeakAuras.doubleWidth,
@@ -836,19 +820,19 @@ function WeakAuras.AddActionOption(id, data)
},
}
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "init", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Actions",
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "init", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#on-init",
0.011, function() return not data.actions.init.do_custom end, {"actions", "init", "custom"}, true);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "start_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "start_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code",
5.1, function() return not (data.actions.start.do_message and WeakAuras.ContainsCustomPlaceHolder(data.actions.start.message)) end, {"actions", "start", "message_custom"}, false);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "start", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Actions",
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "start", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#on-show",
13, function() return not data.actions.start.do_custom end, {"actions", "start", "custom"}, true);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "finish_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "finish_message", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code",
26, function() return not (data.actions.finish.do_message and WeakAuras.ContainsCustomPlaceHolder(data.actions.finish.message)) end, {"actions", "finish", "message_custom"}, false);
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "finish", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Actions",
WeakAuras.AddCodeOption(action.args, data, L["Custom Code"], "finish", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#on-hide",
32, function() return not data.actions.finish.do_custom end, {"actions", "finish", "custom"}, true);
return action;
+15 -15
View File
@@ -846,93 +846,93 @@ function WeakAuras.AddAnimationOption(id, data)
local function hideStartAlphaFunc()
return data.animation.start.type ~= "custom" or data.animation.start.alphaType ~= "custom" or not data.animation.start.use_alpha
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity",
35.3, hideStartAlphaFunc, {"animation", "start", "alphaFunc"}, false);
local function hideStartTranslate()
return data.animation.start.type ~= "custom" or data.animation.start.translateType ~= "custom" or not data.animation.start.use_translate
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position",
39.3, hideStartTranslate, {"animation", "start", "translateFunc"}, false);
local function hideStartScale()
return data.animation.start.type ~= "custom" or data.animation.start.scaleType ~= "custom" or not (data.animation.start.use_scale and WeakAuras.regions[id].region.Scale)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-size",
43.3, hideStartScale, {"animation", "start", "scaleFunc"}, false);
local function hideStartRotateFunc()
return data.animation.start.type ~= "custom" or data.animation.start.rotateType ~= "custom" or not (data.animation.start.use_rotate and WeakAuras.regions[id].region.Rotate)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate",
47.3, hideStartRotateFunc, {"animation", "start", "rotateFunc"}, false);
local function hideStartColorFunc()
return data.animation.start.type ~= "custom" or data.animation.start.colorType ~= "custom" or not (data.animation.start.use_color and WeakAuras.regions[id].region.Color)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "start_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color",
48.7, hideStartColorFunc, {"animation", "start", "colorFunc"}, false);
-- Text Editors for "main"
local function hideMainAlphaFunc()
return data.animation.main.type ~= "custom" or data.animation.main.alphaType ~= "custom" or not data.animation.main.use_alpha
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity",
55.3, hideMainAlphaFunc, {"animation", "main", "alphaFunc"}, false, nil, extraSetFunction);
local function hideMainTranslate()
return data.animation.main.type ~= "custom" or data.animation.main.translateType ~= "custom" or not data.animation.main.use_translate
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position",
59.3, hideMainTranslate, {"animation", "main", "translateFunc"}, false, nil, extraSetFunction);
local function hideMainScale()
return data.animation.main.type ~= "custom" or data.animation.main.scaleType ~= "custom" or not (data.animation.main.use_scale and WeakAuras.regions[id].region.Scale)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-sizes",
63.3, hideMainScale, {"animation", "main", "scaleFunc"}, false, nil, extraSetFunction);
local function hideMainRotateFunc()
return data.animation.main.type ~= "custom" or data.animation.main.rotateType ~= "custom" or not (data.animation.main.use_rotate and WeakAuras.regions[id].region.Rotate)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate",
67.3, hideMainRotateFunc, {"animation", "main", "rotateFunc"}, false, nil, extraSetFunction);
local function hideMainColorFunc()
return data.animation.main.type ~= "custom" or data.animation.main.colorType ~= "custom" or not (data.animation.main.use_color and WeakAuras.regions[id].region.Color)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "main_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color",
68.7, hideMainColorFunc, {"animation", "main", "colorFunc"}, false, nil, extraSetFunction);
-- Text Editors for "finish"
local function hideFinishAlphaFunc()
return data.animation.finish.type ~= "custom" or data.animation.finish.alphaType ~= "custom" or not data.animation.finish.use_alpha
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_alphaFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#alpha-opacity",
75.3, hideFinishAlphaFunc, {"animation", "finish", "alphaFunc"}, false);
local function hideFinishTranslate()
return data.animation.finish.type ~= "custom" or data.animation.finish.translateType ~= "custom" or not data.animation.finish.use_translate
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_translateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#translate-position",
79.3, hideFinishTranslate, {"animation", "finish", "translateFunc"}, false);
local function hideFinishScale()
return data.animation.finish.type ~= "custom" or data.animation.finish.scaleType ~= "custom" or not (data.animation.finish.use_scale and WeakAuras.regions[id].region.Scale)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_scaleFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#scale-size",
83.3, hideFinishScale, {"animation", "finish", "scaleFunc"}, false);
local function hideFinishRotateFunc()
return data.animation.finish.type ~= "custom" or data.animation.finish.rotateType ~= "custom" or not (data.animation.finish.use_rotate and WeakAuras.regions[id].region.Rotate)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_rotateFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#rotate",
87.3, hideFinishRotateFunc, {"animation", "finish", "rotateFunc"}, false);
local function hideFinishColorFunc()
return data.animation.finish.type ~= "custom" or data.animation.finish.colorType ~= "custom" or not (data.animation.finish.use_color and WeakAuras.regions[id].region.Color)
end
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Animation-Functions",
WeakAuras.AddCodeOption(animation.args, data, L["Custom Function"], "finish_colorFunc", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#color",
88.7, hideFinishColorFunc, {"animation", "finish", "colorFunc"}, false);
return animation;
+1 -1
View File
@@ -16,7 +16,7 @@
width (required) -> number between 0.1 and 2 (softMin of 0.5). Determines the width of the option.
useDesc (optional) -> bool. If false, then the tooltip will not be used.
desc (optional) -> string to be displayed in the option tooltip
When options are merged together (i.e. when the user multiselects and then opens the custom options tab), there is one additonal field:
When options are merged together (i.e. when the user multiselects and then opens the custom options tab), there is one additional field:
references -> childID <=> optionID map, used to dereference to the proper option table in setters
Supported option types, and additional fields that each type supports/requires:
group -> represents a group of options.
+16
View File
@@ -680,6 +680,22 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and not trigger.useClass) end
},
ignoreDead = {
type = "toggle",
name = WeakAuras.newFeatureString .. 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
},
ignoreDisconnected = {
type = "toggle",
name = WeakAuras.newFeatureString .. 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
},
useGroup_count = {
type = "toggle",
width = WeakAuras.normalWidth,
+7 -23
View File
@@ -20,7 +20,7 @@
-- - variable: Variable inside the trigger state to check
-- - op: Operator to use for check
-- - value: Value to check
-- - checks: Sub Checks for Combinations, each containg trigger, variable, op, value or checks
-- - checks: Sub Checks for Combinations, each containing trigger, variable, op, value or checks
-- - (for merged) references
-- - id => conditionIndex
-- => op
@@ -677,22 +677,6 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
}
order = order + 1;
args["condition" .. i .. "value" .. j .. "message channel"] = {
type = "input",
width = WeakAuras.normalWidth,
name = blueIfNoValue2(data, conditions[i].changes[j], "value", "message_channel", L["Channel Number"], L["Channel Number"]),
desc = descIfNoValue2(data, conditions[i].changes[j], "value", "message_channel", propertyType),
order = order,
get = function()
return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.message_channel;
end,
set = setValueComplex("message_channel"),
hidden = function()
return not anyMessageType("CHANNEL");
end
}
order = order + 1;
local descMessage = descIfNoValue2(data, conditions[i].changes[j], "value", "message", propertyType);
if (not descMessage and data ~= WeakAuras.tempGroup) then
descMessage = L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
@@ -743,9 +727,9 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
local changeIndex = reference.changeIndex;
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
end
WeakAuras.OpenTextEditor(data, multipath, nil, true);
WeakAuras.OpenTextEditor(data, multipath, nil, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1");
else
WeakAuras.OpenTextEditor(data, {"conditions", i, "changes", j, "value", "custom"});
WeakAuras.OpenTextEditor(data, {"conditions", i, "changes", j, "value", "custom"}, nil, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#chat-message---custom-code-1");
end
end
}
@@ -822,10 +806,10 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
childData.conditions[conditionIndex].changes[changeIndex].value = childData.conditions[conditionIndex].changes[changeIndex].value or {};
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
end
WeakAuras.OpenTextEditor(data, multipath, true, true);
WeakAuras.OpenTextEditor(data, multipath, true, true, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#run-custom-code");
else
data.conditions[i].changes[j].value = data.conditions[i].changes[j].value or {};
WeakAuras.OpenTextEditor(data, {"conditions", i, "changes", j, "value", "custom"}, true);
WeakAuras.OpenTextEditor(data, {"conditions", i, "changes", j, "value", "custom"}, true, nil, nil, nil, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#run-custom-code");
end
end
}
@@ -1957,7 +1941,7 @@ local function createConditionTemplates(data)
return conditionTemplates, conditionTemplateWithoutCombinations;
end
local function buildAllPotentialProperies(data, category)
local function buildAllPotentialProperties(data, category)
local allProperties = {};
allProperties.propertyMap = {};
if (data.controlledChildren) then
@@ -2276,7 +2260,7 @@ function WeakAuras.GetConditionOptions(data, args, conditionVariable, startorder
local conditionTemplates, conditionTemplateWithoutCombinations = createConditionTemplates(data);
-- Build potential properties structure
local allProperties = buildAllPotentialProperies(data, category);
local allProperties = buildAllPotentialProperties(data, category);
-- Build currently selected conditions
local conditions;
+9 -9
View File
@@ -315,21 +315,21 @@ local function GetCustomTriggerOptions(data, optionTriggerChoices, trigger)
local function hideCustomTrigger()
return not (trigger.type == "custom")
end
WeakAuras.AddCodeOption(customOptions, data, L["Custom Trigger"], "custom_trigger", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Custom Trigger"], "custom_trigger", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-trigger",
10, hideCustomTrigger, appendToTriggerPath("custom"), false, true, extraSetFunction, nil, true);
local function hideCustomVariables()
return not (trigger.type == "custom" and trigger.custom_type == "stateupdate");
end
WeakAuras.AddCodeOption(customOptions, data, L["Custom Variables"], "custom_variables", "https://github.com/WeakAuras/WeakAuras2/wiki/Trigger-State-Updater-(TSU)#custom-variables",
WeakAuras.AddCodeOption(customOptions, data, L["Custom Variables"], "custom_variables", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-variables",
11, hideCustomVariables, appendToTriggerPath("customVariables"), false, true, extraSetFunctionReload, nil, true);
local function hideCustomUntrigger()
return not (trigger.type == "custom"
and (trigger.custom_type == "status" or (trigger.custom_type == "event" and trigger.custom_hide == "custom")))
end
WeakAuras.AddCodeOption(customOptions, data, L["Custom Untrigger"], "custom_untrigger", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Custom Untrigger"], "custom_untrigger", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-untrigger",
14, hideCustomUntrigger, appendToUntriggerPath("custom"), false, true, extraSetFunction);
local function hideCustomDuration()
@@ -337,7 +337,7 @@ local function GetCustomTriggerOptions(data, optionTriggerChoices, trigger)
and (trigger.custom_type == "status"
or (trigger.custom_type == "event" and (trigger.custom_hide ~= "timed" or trigger.dynamicDuration))))
end
WeakAuras.AddCodeOption(customOptions, data, L["Duration Info"], "custom_duration", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Duration Info"], "custom_duration", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#duration-info",
16, hideCustomDuration, appendToTriggerPath("customDuration"), false, true, extraSetFunctionReload);
local function hideIfTriggerStateUpdate()
@@ -379,17 +379,17 @@ local function GetCustomTriggerOptions(data, optionTriggerChoices, trigger)
}
}
WeakAuras.AddCodeOption(customOptions, data, string.format(L["Overlay %s Info"], i), "custom_overlay" .. i, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, string.format(L["Overlay %s Info"], i), "custom_overlay" .. i, "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#overlay-info",
17 + i / 10, hideOverlay, appendToTriggerPath("customOverlay" .. i), false, true, extraSetFunctionReload, extraFunctions);
end
WeakAuras.AddCodeOption(customOptions, data, L["Name Info"], "custom_name", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Name Info"], "custom_name", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#name-info",
18, hideIfTriggerStateUpdate, appendToTriggerPath("customName"), false, true, extraSetFunctionReload);
WeakAuras.AddCodeOption(customOptions, data, L["Icon Info"], "custom_icon", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Icon Info"], "custom_icon", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#icon-info",
20, hideIfTriggerStateUpdate, appendToTriggerPath("customIcon"), false, true, extraSetFunction);
WeakAuras.AddCodeOption(customOptions, data, L["Texture Info"], "custom_texture", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Texture Info"], "custom_texture", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#texture-info",
22, hideIfTriggerStateUpdate, appendToTriggerPath("customTexture"), false, true, extraSetFunction);
WeakAuras.AddCodeOption(customOptions, data, L["Stack Info"], "custom_stacks", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Triggers",
WeakAuras.AddCodeOption(customOptions, data, L["Stack Info"], "custom_stacks", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#stack-info",
23, hideIfTriggerStateUpdate, appendToTriggerPath("customStacks"), false, true, extraSetFunctionReload);
return customOptions;
@@ -27,7 +27,7 @@ local colorScheme = {
[IndentationLib.tokens.TOKEN_COMMENT_LONG] = "|c0000aa00",
[IndentationLib.tokens.TOKEN_NUMBER] = "|c00ff9900",
[IndentationLib.tokens.TOKEN_STRING] = "|c00999999",
-- ellipsis, curly braces, table acces
-- ellipsis, curly braces, table access
["..."] = tableColor,
["{"] = tableColor,
["}"] = tableColor,
+10 -10
View File
@@ -875,20 +875,20 @@ local function ConstructMoverSizer(parent)
end
local regionScale = self.moving.region:GetScale()
self.text:SetText(("(%.2f, %.2f)"):format(dX*1/regionScale, dY*1/regionScale))
local midx = (distance / 2) * cos(angle)
local midy = (distance / 2) * sin(angle)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
local midX = (distance / 2) * cos(angle)
local midY = (distance / 2) * sin(angle)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midX, midY)
local left, right, top, bottom, centerX, centerY = frame:GetLeft(), frame:GetRight(), frame:GetTop(), frame:GetBottom(), frame:GetCenter()
if (midx > 0 and (self.text:GetRight() or 0) > (left or 0))
or (midx < 0 and (self.text:GetLeft() or 0) < (right or 0))
if (midX > 0 and (self.text:GetRight() or 0) > (left or 0))
or (midX < 0 and (self.text:GetLeft() or 0) < (right or 0))
then
if midy > 0 and (self.text:GetTop() or 0) > (top or 0) then
midy = midy - ((self.text:GetTop() or 0) - (bottom or 0))
elseif midy < 0 and (self.text:GetBottom() or 0) < (top or 0) then
midy = midy + ((top or 0) - (self.text:GetBottom() or 0))
if midY > 0 and (self.text:GetTop() or 0) > (top or 0) then
midY = midY - ((self.text:GetTop() or 0) - (bottom or 0))
elseif midY < 0 and (self.text:GetBottom() or 0) < (top or 0) then
midY = midY + ((top or 0) - (self.text:GetBottom() or 0))
end
end
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midX, midY)
if self.isMoving then
if mover.align then
local ctrlDown = IsControlKeyDown()
@@ -226,13 +226,13 @@ function WeakAuras.CreateFrame()
local title = CreateFrame("Frame", nil, frame)
local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
local titleText = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
titletext:SetText("WeakAuras " .. WeakAuras.versionString)
titleText:SetText("WeakAuras " .. WeakAuras.versionString)
local titlebg = CreateDecorationWide(frame, max(120, titletext:GetWidth()))
titlebg:SetPoint("TOP", 0, 24)
titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
local titleBG = CreateDecorationWide(frame, max(120, titleText:GetWidth()))
titleBG:SetPoint("TOP", 0, 24)
titleText:SetPoint("TOP", titleBG, "TOP", 0, -14)
local function commitWindowChanges()
@@ -265,8 +265,8 @@ function WeakAuras.CreateFrame()
frame:StopMovingOrSizing()
commitWindowChanges()
end)
title:SetPoint("BOTTOMLEFT", titlebg, "BOTTOMLEFT", -25, 0)
title:SetPoint("TOPRIGHT", titlebg, "TOPRIGHT", 25, 0)
title:SetPoint("BOTTOMLEFT", titleBG, "BOTTOMLEFT", -25, 0)
title:SetPoint("TOPRIGHT", titleBG, "TOPRIGHT", 25, 0)
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMLEFT")
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMRIGHT")
@@ -562,7 +562,7 @@ function WeakAuras.CreateFrame()
return status.offset, status.offset + self.scrollframe:GetHeight()
end
-- override SetScroll to make childrens visible as needed
-- override SetScroll to make children visible as needed
local oldSetScroll = buttonsScroll.SetScroll
buttonsScroll.SetScroll = function(self, value)
if self:GetScrollPos() ~= value then
@@ -329,7 +329,7 @@ local function ConstructTextEditor(frame)
local heading1 = AceGUI:Create("Heading")
heading1:SetText(L["Premade Snippets"])
heading1:SetRelativeWidth(1)
heading1:SetRelativeWidth(0.7)
frame:AddChild(heading1)
-- Iterate premade snippets and make buttons for them
+1 -1
View File
@@ -459,7 +459,7 @@ local function modifyThumbnail(parent, borderframe, data, fullModify, width, hei
borderframe:SetParent(parent)
-- Defaut size
-- Default size
width = width or 26;
height = height or 15;
+1 -1
View File
@@ -266,7 +266,7 @@ local function createOptions(id, data)
},
};
WeakAuras.AddCodeOption(options, data, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
WeakAuras.AddCodeOption(options, data, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
37, function() return not WeakAuras.ContainsCustomPlaceHolder(data.displayText) end, {"customText"}, false);
return {
@@ -475,7 +475,7 @@ local function createOptions(parentData, data, index, subIndex)
},
}
WeakAuras.AddCodeOption(commonTextOptions, parentData, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Text-Replacements",
WeakAuras.AddCodeOption(commonTextOptions, parentData, L["Custom Function"], "customText", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-text",
4, hideCustomTextOption, {"customText"}, false)
return options, commonTextOptions
+15 -15
View File
@@ -2827,7 +2827,7 @@ end
scheduleRefillFrame.ids = {}
-- TODO replace older ReloadOptions, SchduleReloadOptions, ReloadTriggerOptions, ReloadGroupRegionOptions
-- TODO replace older ReloadOptions, ScheduleReloadOptions, ReloadTriggerOptions, ReloadGroupRegionOptions
-- automatically clear parent/tempGroup ?
function WeakAuras.ReloadOptions2(id, data)
displayOptions[id] = nil
@@ -2838,7 +2838,7 @@ function WeakAuras.RefillOptions()
frame:RefillOptions()
end
function WeakAuras.SchduleRefillOptions()
function WeakAuras.ScheduleRefillOptions()
scheduleRefillFrame:ScheduleRefillOnly()
end
@@ -3329,7 +3329,7 @@ function WeakAuras.ReloadTriggerOptions(data)
local function hideTriggerCombiner()
return not (data.triggers.disjunctive == "custom")
end
WeakAuras.AddCodeOption(trigger_options, data, L["Custom"], "custom_trigger_combination", "https://github.com/WeakAuras/WeakAuras2/wiki/Aura-Activation-and-Deactivation",
WeakAuras.AddCodeOption(trigger_options, data, L["Custom"], "custom_trigger_combination", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-activation",
0.1, hideTriggerCombiner, {"triggers", "customTriggerLogic"}, false);
local order = 81;
@@ -3848,7 +3848,7 @@ function WeakAuras.PositionOptions(id, data, _, hideWidthHeight, disableSelfPoin
type = "toggle",
width = WeakAuras.normalWidth,
name = L["Set Parent to Anchor"],
desc = L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visiblility and scale."],
desc = L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visibility and scale."],
order = 77,
get = function()
return data.anchorFrameParent or data.anchorFrameParent == nil;
@@ -3875,7 +3875,7 @@ function WeakAuras.PositionOptions(id, data, _, hideWidthHeight, disableSelfPoin
end
},
};
WeakAuras.AddCodeOption(positionOptions, data, L["Custom Anchor"], "custom_anchor", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Anchor",
WeakAuras.AddCodeOption(positionOptions, data, L["Custom Anchor"], "custom_anchor", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-anchor-function",
72.1, function() return not(data.anchorFrameType == "CUSTOM" and not IsParentDynamicGroup()) end, {"customAnchor"}, nil, nil, nil, nil, nil, true)
return positionOptions;
end
@@ -4134,8 +4134,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
for _, child in ipairs(to_sort) do
child.frame:Show();
if child.AcquireThumnail then
child:AcquireThumnail()
if child.AcquireThumbnail then
child:AcquireThumbnail()
end
tinsert(frame.buttonsScroll.children, child);
local controlledChildren = children[child:GetTitle()];
@@ -4144,8 +4144,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
for _, groupchild in ipairs(controlledChildren) do
if(child:GetExpanded() and visible[groupchild]) then
displayButtons[groupchild].frame:Show();
if displayButtons[groupchild].AcquireThumnail then
displayButtons[groupchild]:AcquireThumnail()
if displayButtons[groupchild].AcquireThumbnail then
displayButtons[groupchild]:AcquireThumbnail()
end
tinsert(frame.buttonsScroll.children, displayButtons[groupchild]);
end
@@ -4199,8 +4199,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
for _, child in ipairs(to_sort) do
child.frame:Show();
if child.AcquireThumnail then
child:AcquireThumnail()
if child.AcquireThumbnail then
child:AcquireThumbnail()
end
tinsert(frame.buttonsScroll.children, child);
local controlledChildren = children[child:GetTitle()];
@@ -4209,8 +4209,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
for _, groupchild in ipairs(controlledChildren) do
if(child:GetExpanded() and visible[groupchild]) then
displayButtons[groupchild].frame:Show();
if displayButtons[groupchild].AcquireThumnail then
displayButtons[groupchild]:AcquireThumnail()
if displayButtons[groupchild].AcquireThumbnail then
displayButtons[groupchild]:AcquireThumbnail()
end
tinsert(frame.buttonsScroll.children, displayButtons[groupchild]);
end
@@ -4224,8 +4224,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
local groupVisible = not group or visible[group] and displayButtons[group]:GetExpanded()
if(not groupVisible or not visible[id]) then
child.frame:Hide();
if child.ReleaseThumnail then
child:ReleaseThumnail()
if child.ReleaseThumbnail then
child:ReleaseThumbnail()
end
end
end
+2 -2
View File
@@ -1,7 +1,7 @@
## Interface: 80300
## Interface: 30300
## Title: WeakAuras Options
## Author: Mirrored and the WeakAuras Team
## Version: 2.17.4
## Version: 2.17.5
## Notes: Options for WeakAuras
## Notes-esES: Opciones para WeakAuras
## Notes-deDE: Optionen für WeakAuras