from retail
This commit is contained in:
+29
-12
@@ -696,11 +696,6 @@ local function UpdateStateWithNoMatch(time, triggerStates, triggerInfo, cloneId,
|
|||||||
changed = true
|
changed = true
|
||||||
end
|
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
|
if state.matchCount ~= matchCount then
|
||||||
state.matchCount = matchCount
|
state.matchCount = matchCount
|
||||||
changed = true
|
changed = true
|
||||||
@@ -867,10 +862,18 @@ local function TriggerInfoApplies(triggerInfo, unit)
|
|||||||
return false
|
return false
|
||||||
end
|
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 triggerInfo.unit == "group" and triggerInfo.groupSubType == "party" then
|
||||||
if IsInRaid() then
|
if IsInRaid() then
|
||||||
-- Filter our player/party# while in raid and keep only raid units that are correct
|
-- 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
|
return false
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -881,11 +884,11 @@ local function TriggerInfoApplies(triggerInfo, unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Filter our player/party# while in raid
|
-- 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
|
return false
|
||||||
end
|
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
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -1353,13 +1356,13 @@ end
|
|||||||
|
|
||||||
local function ScanUnit(time, arg1)
|
local function ScanUnit(time, arg1)
|
||||||
if not arg1 then return end
|
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)
|
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)
|
ScanGroupUnit(time, matchDataChanged, "group", arg1)
|
||||||
elseif WeakAuras.multiUnitUnits.boss[arg1] then
|
elseif arg1:sub(1,4) == "boss" then
|
||||||
ScanGroupUnit(time, matchDataChanged, "boss", arg1)
|
ScanGroupUnit(time, matchDataChanged, "boss", arg1)
|
||||||
elseif WeakAuras.multiUnitUnits.arena[arg1] then
|
elseif arg1:sub(1,5) == "arena" then
|
||||||
ScanGroupUnit(time, matchDataChanged, "arena", arg1)
|
ScanGroupUnit(time, matchDataChanged, "arena", arg1)
|
||||||
else
|
else
|
||||||
ScanGroupUnit(time, matchDataChanged, nil, arg1)
|
ScanGroupUnit(time, matchDataChanged, nil, arg1)
|
||||||
@@ -1503,6 +1506,14 @@ local function EventHandler(frame, event, arg1, arg2, ...)
|
|||||||
tinsert(unitsToRemove, unit)
|
tinsert(unitsToRemove, unit)
|
||||||
end
|
end
|
||||||
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
|
elseif event == "UNIT_ENTERED_VEHICLE" or event == "UNIT_EXITED_VEHICLE" then
|
||||||
if arg1 == "player" then
|
if arg1 == "player" then
|
||||||
ScanGroupUnit(time, matchDataChanged, nil, "vehicle")
|
ScanGroupUnit(time, matchDataChanged, nil, "vehicle")
|
||||||
@@ -1530,6 +1541,8 @@ local function EventHandler(frame, event, arg1, arg2, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
frame:RegisterEvent("UNIT_AURA")
|
frame:RegisterEvent("UNIT_AURA")
|
||||||
|
frame:RegisterEvent("UNIT_FLAGS")
|
||||||
|
frame:RegisterEvent("PLAYER_FLAGS_CHANGED")
|
||||||
frame:RegisterEvent("UNIT_PET")
|
frame:RegisterEvent("UNIT_PET")
|
||||||
frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
|
frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
|
||||||
frame:RegisterEvent("ARENA_OPPONENT_UPDATE")
|
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 groupTrigger = trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party"
|
||||||
local effectiveIgnoreSelf = groupTrigger and trigger.ignoreSelf
|
local effectiveIgnoreSelf = groupTrigger and trigger.ignoreSelf
|
||||||
local effectiveClass = groupTrigger and trigger.useClass and trigger.class
|
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
|
if trigger.unit == "multi" then
|
||||||
BuffTrigger.InitMultiAura()
|
BuffTrigger.InitMultiAura()
|
||||||
@@ -2154,6 +2169,8 @@ function BuffTrigger.Add(data)
|
|||||||
fetchTooltip = not IsSingleMissing(trigger) and trigger.unit ~= "multi" and trigger.fetchTooltip,
|
fetchTooltip = not IsSingleMissing(trigger) and trigger.unit ~= "multi" and trigger.fetchTooltip,
|
||||||
groupTrigger = IsGroupTrigger(trigger),
|
groupTrigger = IsGroupTrigger(trigger),
|
||||||
ignoreSelf = effectiveIgnoreSelf,
|
ignoreSelf = effectiveIgnoreSelf,
|
||||||
|
ignoreDead = effectiveIgnoreDead,
|
||||||
|
ignoreDisconnected = effectiveIgnoreDisconnected,
|
||||||
groupSubType = groupSubType,
|
groupSubType = groupSubType,
|
||||||
groupCountFunc = groupCountFunc,
|
groupCountFunc = groupCountFunc,
|
||||||
class = effectiveClass,
|
class = effectiveClass,
|
||||||
|
|||||||
@@ -388,11 +388,13 @@ local function callFunctionForActivateEvent(func, trigger, fallback, errorHandle
|
|||||||
return fallback
|
return fallback
|
||||||
end
|
end
|
||||||
local ok, value = pcall(func, trigger)
|
local ok, value = pcall(func, trigger)
|
||||||
if not ok then
|
if ok and value then
|
||||||
errorHandler(value)
|
|
||||||
return fallback
|
|
||||||
else
|
|
||||||
return value
|
return value
|
||||||
|
else
|
||||||
|
if not ok then
|
||||||
|
errorHandler(value)
|
||||||
|
end
|
||||||
|
return fallback
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -804,6 +806,11 @@ function GenericTrigger.ScanWithFakeEvent(id, fake)
|
|||||||
end
|
end
|
||||||
updateTriggerState = RunTriggerFunc(allStates, events[id][triggernum], id, triggernum, eventName) or updateTriggerState;
|
updateTriggerState = RunTriggerFunc(allStates, events[id][triggernum], id, triggernum, eventName) or updateTriggerState;
|
||||||
end
|
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
|
end
|
||||||
end
|
end
|
||||||
@@ -855,7 +862,7 @@ function HandleUnitEvent(frame, event, unit, ...)
|
|||||||
WeakAuras.StartProfileSystem("generictrigger " .. event .. " " .. unit);
|
WeakAuras.StartProfileSystem("generictrigger " .. event .. " " .. unit);
|
||||||
if not(WeakAuras.IsPaused()) then
|
if not(WeakAuras.IsPaused()) then
|
||||||
if (UnitIsUnit(unit, frame.unit)) then
|
if (UnitIsUnit(unit, frame.unit)) then
|
||||||
WeakAuras.ScanUnitEvents(event, unit, ...);
|
WeakAuras.ScanUnitEvents(event, frame.unit, ...);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
WeakAuras.StopProfileSystem("generictrigger " .. event .. " " .. unit);
|
WeakAuras.StopProfileSystem("generictrigger " .. event .. " " .. unit);
|
||||||
@@ -1227,9 +1234,6 @@ function GenericTrigger.Add(data, region)
|
|||||||
triggerFunc = WeakAuras.LoadFunction("return "..(trigger.custom or ""), id);
|
triggerFunc = WeakAuras.LoadFunction("return "..(trigger.custom or ""), id);
|
||||||
if (trigger.custom_type == "stateupdate") then
|
if (trigger.custom_type == "stateupdate") then
|
||||||
tsuConditionVariables = WeakAuras.LoadFunction("return function() return \n" .. (trigger.customVariables or "") .. "\n end");
|
tsuConditionVariables = WeakAuras.LoadFunction("return function() return \n" .. (trigger.customVariables or "") .. "\n end");
|
||||||
if not tsuConditionVariables then
|
|
||||||
tsuConditionVariables = function() return end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if(trigger.custom_type == "status" or trigger.custom_type == "event" and trigger.custom_hide == "custom") then
|
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("PLAYER_ENTER_COMBAT");
|
||||||
swingTimerFrame:RegisterEvent("UNIT_ATTACK_SPEED");
|
swingTimerFrame:RegisterEvent("UNIT_ATTACK_SPEED");
|
||||||
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
|
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED");
|
||||||
if WeakAuras.IsClassic() then
|
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_START")
|
||||||
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_START")
|
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
|
||||||
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_INTERRUPTED")
|
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_FAILED")
|
||||||
swingTimerFrame:RegisterEvent("UNIT_SPELLCAST_FAILED")
|
|
||||||
end
|
|
||||||
swingTimerFrame:SetScript("OnEvent",
|
swingTimerFrame:SetScript("OnEvent",
|
||||||
function(_, event, ...)
|
function(_, event, ...)
|
||||||
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
|
if event == "COMBAT_LOG_EVENT_UNFILTERED" then
|
||||||
@@ -3670,47 +3672,47 @@ function GenericTrigger.CreateFallbackState(data, triggernum, state)
|
|||||||
WeakAuras.ActivateAuraEnvironment(data.id, "", state);
|
WeakAuras.ActivateAuraEnvironment(data.id, "", state);
|
||||||
local firstTrigger = data.triggers[1].trigger
|
local firstTrigger = data.triggers[1].trigger
|
||||||
if (event.nameFunc) then
|
if (event.nameFunc) then
|
||||||
local success, res = pcall(event.nameFunc, firstTrigger);
|
local ok, name = pcall(event.nameFunc, firstTrigger);
|
||||||
if not success then
|
if not ok then
|
||||||
geterrorhandler()(res)
|
geterrorhandler()(name)
|
||||||
state.name = nil
|
state.name = nil
|
||||||
else
|
else
|
||||||
state.name = res or nil
|
state.name = name or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (event.iconFunc) then
|
if (event.iconFunc) then
|
||||||
local success, res = pcall(event.iconFunc, firstTrigger);
|
local ok, icon = pcall(event.iconFunc, firstTrigger);
|
||||||
if not success then
|
if not ok then
|
||||||
geterrorhandler()(res)
|
geterrorhandler()(icon)
|
||||||
state.icon = nil
|
state.icon = nil
|
||||||
else
|
else
|
||||||
state.icon = res or nil
|
state.icon = icon or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (event.textureFunc ) then
|
if (event.textureFunc ) then
|
||||||
local success, res = pcall(event.textureFunc, firstTrigger);
|
local ok, texture = pcall(event.textureFunc, firstTrigger);
|
||||||
if not success then
|
if not ok then
|
||||||
geterrorhandler()(res)
|
geterrorhandler()(texture)
|
||||||
state.texture = nil
|
state.texture = nil
|
||||||
else
|
else
|
||||||
state.texture = res or nil
|
state.texture = texture or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (event.stacksFunc) then
|
if (event.stacksFunc) then
|
||||||
local success, res = pcall(event.stacksFunc, firstTrigger);
|
local ok, stacks = pcall(event.stacksFunc, firstTrigger);
|
||||||
if not success then
|
if not ok then
|
||||||
geterrorhandler()(res)
|
geterrorhandler()(stacks)
|
||||||
state.stacks = nil
|
state.stacks = nil
|
||||||
else
|
else
|
||||||
state.stacks = res or nil
|
state.stacks = stacks or nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (event.durationFunc) then
|
if (event.durationFunc) then
|
||||||
local success, arg1, arg2, arg3, inverse = pcall(event.durationFunc, firstTrigger);
|
local ok, arg1, arg2, arg3, inverse = pcall(event.durationFunc, firstTrigger);
|
||||||
if not success then
|
if not ok then
|
||||||
geterrorhandler()(arg1)
|
geterrorhandler()(arg1)
|
||||||
state.progressType = "timed";
|
state.progressType = "timed";
|
||||||
state.duration = 0;
|
state.duration = 0;
|
||||||
|
|||||||
+4
-4
@@ -7,8 +7,8 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2
|
|||||||
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
|
WeakAuras.doubleWidth = WeakAuras.normalWidth * 2
|
||||||
|
|
||||||
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
|
local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version")
|
||||||
local versionString = "2.17.4"
|
local versionString = "2.17.5"
|
||||||
local buildTime = "20200422171414"
|
local buildTime = "20200511190745"
|
||||||
|
|
||||||
WeakAuras.versionString = versionStringFromToc
|
WeakAuras.versionString = versionStringFromToc
|
||||||
WeakAuras.buildTime = buildTime
|
WeakAuras.buildTime = buildTime
|
||||||
@@ -39,7 +39,7 @@ end
|
|||||||
WeakAuras.PowerAurasPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\"
|
WeakAuras.PowerAurasPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Auras\\"
|
||||||
WeakAuras.PowerAurasSoundPath = "Interface\\Addons\\WeakAuras\\PowerAurasMedia\\Sounds\\"
|
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("WeakAurasCompanion")
|
||||||
EnableAddOn("WeakAurasArchive")
|
EnableAddOn("WeakAurasArchive")
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ end
|
|||||||
function WeakAuras.StopProfileAura()
|
function WeakAuras.StopProfileAura()
|
||||||
end
|
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()
|
function WeakAuras.StartProfile()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
local MAJOR_VERSION = "LibGetFrame-1.0"
|
local MAJOR_VERSION = "LibGetFrame-1.0"
|
||||||
local MINOR_VERSION = 9
|
local MINOR_VERSION = 20
|
||||||
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
||||||
local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
|
local lib = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
|
||||||
if not lib then return end
|
if not lib then return end
|
||||||
@@ -48,25 +48,30 @@ local defaultPlayerFrames = {
|
|||||||
"SUFUnitplayer",
|
"SUFUnitplayer",
|
||||||
"PitBull4_Frames_Player",
|
"PitBull4_Frames_Player",
|
||||||
"ElvUF_Player",
|
"ElvUF_Player",
|
||||||
"oUF_TukuiPlayer",
|
"oUF_.-Player",
|
||||||
|
"oUF_PlayerPlate",
|
||||||
"PlayerFrame",
|
"PlayerFrame",
|
||||||
}
|
}
|
||||||
local defaultTargetFrames = {
|
local defaultTargetFrames = {
|
||||||
"SUFUnittarget",
|
"SUFUnittarget",
|
||||||
"PitBull4_Frames_Target",
|
"PitBull4_Frames_Target",
|
||||||
"ElvUF_Target",
|
"ElvUF_Target",
|
||||||
|
"oUF_.-Target",
|
||||||
"TargetFrame",
|
"TargetFrame",
|
||||||
"oUF_TukuiTarget",
|
|
||||||
}
|
}
|
||||||
local defaultTargettargetFrames = {
|
local defaultTargettargetFrames = {
|
||||||
"SUFUnittargetarget",
|
"SUFUnittargetarget",
|
||||||
"PitBull4_Frames_Target's target",
|
"PitBull4_Frames_Target's target",
|
||||||
"ElvUF_TargetTarget",
|
"ElvUF_TargetTarget",
|
||||||
|
"oUF_.-TargetTarget",
|
||||||
|
"oUF_ToT",
|
||||||
"TargetTargetFrame",
|
"TargetTargetFrame",
|
||||||
"oUF_TukuiTargetTarget",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local GetFramesCache = {}
|
local GetFramesCache = {}
|
||||||
|
local FrameToUnitFresh = {}
|
||||||
|
local FrameToUnit = {}
|
||||||
|
local UpdatedFrames = {}
|
||||||
|
|
||||||
local function ScanFrames(depth, frame, ...)
|
local function ScanFrames(depth, frame, ...)
|
||||||
if not frame then return end
|
if not frame then return end
|
||||||
@@ -83,6 +88,11 @@ local function ScanFrames(depth, frame, ...)
|
|||||||
local name = frame:GetName()
|
local name = frame:GetName()
|
||||||
if unit and frame:IsVisible() and name then
|
if unit and frame:IsVisible() and name then
|
||||||
GetFramesCache[frame] = name
|
GetFramesCache[frame] = name
|
||||||
|
if unit ~= FrameToUnit[frame] then
|
||||||
|
FrameToUnit[frame] = unit
|
||||||
|
UpdatedFrames[frame] = unit
|
||||||
|
end
|
||||||
|
FrameToUnitFresh[frame] = unit
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -90,18 +100,31 @@ local function ScanFrames(depth, frame, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local wait = false
|
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)
|
local function ScanForUnitFrames(noDelay)
|
||||||
if noDelay then
|
if noDelay then
|
||||||
wipe(GetFramesCache)
|
doScanForUnitFrames()
|
||||||
ScanFrames(0, UIParent)
|
|
||||||
callbacks:Fire("GETFRAME_REFRESH")
|
|
||||||
elseif not wait then
|
elseif not wait then
|
||||||
wait = true
|
wait = true
|
||||||
C_Timer.After(1, function()
|
C_Timer.After(1, function()
|
||||||
wipe(GetFramesCache)
|
doScanForUnitFrames()
|
||||||
ScanFrames(0, UIParent)
|
|
||||||
wait = false
|
|
||||||
callbacks:Fire("GETFRAME_REFRESH")
|
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -157,7 +180,9 @@ local defaultOptions = {
|
|||||||
targetFrames = defaultTargetFrames,
|
targetFrames = defaultTargetFrames,
|
||||||
targettargetFrames = defaultTargettargetFrames,
|
targettargetFrames = defaultTargettargetFrames,
|
||||||
ignoreFrames = {
|
ignoreFrames = {
|
||||||
"PitBull4_Frames_Target's target's target"
|
"PitBull4_Frames_Target's target's target",
|
||||||
|
"ElvUF_PartyGroup%dUnitButton%dTarget",
|
||||||
|
"RavenButton"
|
||||||
},
|
},
|
||||||
returnAll = false,
|
returnAll = false,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ local properties = {
|
|||||||
min = 1,
|
min = 1,
|
||||||
softMax = screenWidth,
|
softMax = screenWidth,
|
||||||
bigStep = 1,
|
bigStep = 1,
|
||||||
defautl = 32,
|
default = 32,
|
||||||
},
|
},
|
||||||
height = {
|
height = {
|
||||||
display = L["Height"],
|
display = L["Height"],
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ end
|
|||||||
local sortNilFirst = WeakAuras.InvertSort(WeakAuras.SortNilLast)
|
local sortNilFirst = WeakAuras.InvertSort(WeakAuras.SortNilLast)
|
||||||
function WeakAuras.SortNilFirst(a, b)
|
function WeakAuras.SortNilFirst(a, b)
|
||||||
if a == nil and b == nil then
|
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
|
-- as well as to sort nils onto one side
|
||||||
-- to maintain stability, we need SortNil(nil, nil) to always be false
|
-- to maintain stability, we need SortNil(nil, nil) to always be false
|
||||||
-- hence this special case
|
-- hence this special case
|
||||||
@@ -778,8 +778,8 @@ local function modify(parent, region, data)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function region:Suspend()
|
function region:Suspend()
|
||||||
-- Stops group from repositioning and reindexing children
|
-- Stops group from repositioning and re-indexing children
|
||||||
-- Calls to Activate, Deactivate, and Reindex will cache the relevant children
|
-- Calls to Activate, Deactivate, and Re-index will cache the relevant children
|
||||||
-- Similarly, Sort, Position, and Resize will be stopped
|
-- Similarly, Sort, Position, and Resize will be stopped
|
||||||
-- to be called on the next Resume
|
-- to be called on the next Resume
|
||||||
-- for when the group is resumed
|
-- for when the group is resumed
|
||||||
|
|||||||
@@ -133,9 +133,9 @@ local function AcquireModel(region, data)
|
|||||||
-- Enable model animation
|
-- Enable model animation
|
||||||
if(data.advance) then
|
if(data.advance) then
|
||||||
local elapsed = 0;
|
local elapsed = 0;
|
||||||
model:SetScript("OnUpdate", function(self, e)
|
model:SetScript("OnUpdate", function(self, elaps)
|
||||||
WeakAuras.StartProfileSystem("model");
|
WeakAuras.StartProfileSystem("model");
|
||||||
elapsed = elapsed + (e * 1000);
|
elapsed = elapsed + (elaps * 1000);
|
||||||
model:SetSequenceTime(data.sequence, elapsed);
|
model:SetSequenceTime(data.sequence, elapsed);
|
||||||
WeakAuras.StopProfileSystem("model");
|
WeakAuras.StopProfileSystem("model");
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -52,12 +52,12 @@ end
|
|||||||
-- Adjusted Duration
|
-- Adjusted Duration
|
||||||
|
|
||||||
function WeakAuras.regionPrototype.AddAdjustedDurationToDefault(default)
|
function WeakAuras.regionPrototype.AddAdjustedDurationToDefault(default)
|
||||||
default.useAdjustededMax = false;
|
default.useAdjustedMax = false;
|
||||||
default.useAdjustededMin = false;
|
default.useAdjustedMin = false;
|
||||||
end
|
end
|
||||||
|
|
||||||
function WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, order)
|
function WeakAuras.regionPrototype.AddAdjustedDurationOptions(options, data, order)
|
||||||
options.useAdjustededMin = {
|
options.useAdjustedMin = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
width = WeakAuras.normalWidth,
|
width = WeakAuras.normalWidth,
|
||||||
name = L["Set Minimum Progress"],
|
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,
|
hidden = function() return not (not data.useAdjustededMin and data.useAdjustededMax) end,
|
||||||
};
|
};
|
||||||
|
|
||||||
options.useAdjustededMax = {
|
options.useAdjustedMax = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
width = WeakAuras.normalWidth,
|
width = WeakAuras.normalWidth,
|
||||||
name = L["Set Maximum Progress"],
|
name = L["Set Maximum Progress"],
|
||||||
@@ -505,9 +505,9 @@ function WeakAuras.regionPrototype.modify(parent, region, data)
|
|||||||
if (defaultsForRegion and defaultsForRegion.alpha) then
|
if (defaultsForRegion and defaultsForRegion.alpha) then
|
||||||
region:SetRegionAlpha(data.alpha);
|
region:SetRegionAlpha(data.alpha);
|
||||||
end
|
end
|
||||||
local hasAdjustedMin = defaultsForRegion and defaultsForRegion.useAdjustededMin ~= nil and data.useAdjustededMin
|
local hasAdjustedMin = defaultsForRegion and defaultsForRegion.useAdjustedMin ~= nil and data.useAdjustededMin
|
||||||
and data.adjustedMin;
|
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;
|
and data.adjustedMax;
|
||||||
|
|
||||||
region.adjustedMin = nil
|
region.adjustedMin = nil
|
||||||
@@ -707,8 +707,8 @@ end
|
|||||||
-- Expand/Collapse function
|
-- Expand/Collapse function
|
||||||
function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parentRegionType)
|
function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, parent, parentRegionType)
|
||||||
local id = data.id
|
local id = data.id
|
||||||
local indynamicgroup = parentRegionType == "dynamicgroup";
|
local inDynamicGroup = parentRegionType == "dynamicgroup";
|
||||||
local ingroup = parentRegionType == "group";
|
local inGroup = parentRegionType == "group";
|
||||||
|
|
||||||
local startMainAnimation = function()
|
local startMainAnimation = function()
|
||||||
WeakAuras.Animate("display", data, "main", data.animation.main, region, false, nil, true, cloneId);
|
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
|
end
|
||||||
|
|
||||||
local hideRegion;
|
local hideRegion;
|
||||||
if(indynamicgroup) then
|
if(inDynamicGroup) then
|
||||||
hideRegion = function()
|
hideRegion = function()
|
||||||
if region.PreHide then
|
if region.PreHide then
|
||||||
region:PreHide()
|
region:PreHide()
|
||||||
@@ -761,7 +761,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if(indynamicgroup) then
|
if(inDynamicGroup) then
|
||||||
function region:Collapse()
|
function region:Collapse()
|
||||||
if (not region.toShow) then
|
if (not region.toShow) then
|
||||||
return;
|
return;
|
||||||
@@ -816,7 +816,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
|
|||||||
hideRegion();
|
hideRegion();
|
||||||
end
|
end
|
||||||
|
|
||||||
if ingroup then
|
if inGroup then
|
||||||
parent:UpdateBorder(region);
|
parent:UpdateBorder(region);
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -853,7 +853,7 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare
|
|||||||
startMainAnimation();
|
startMainAnimation();
|
||||||
end
|
end
|
||||||
|
|
||||||
if ingroup then
|
if inGroup then
|
||||||
parent:UpdateBorder(region);
|
parent:UpdateBorder(region);
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ local function animRotate(object, degrees, anchor)
|
|||||||
end
|
end
|
||||||
-- Something to rotate
|
-- Something to rotate
|
||||||
if object.animationGroup or degrees ~= 0 then
|
if object.animationGroup or degrees ~= 0 then
|
||||||
-- Create AnimatioGroup and rotation animation
|
-- Create AnimationGroup and rotation animation
|
||||||
object.animationGroup = object.animationGroup or object:CreateAnimationGroup();
|
object.animationGroup = object.animationGroup or object:CreateAnimationGroup();
|
||||||
local group = object.animationGroup;
|
local group = object.animationGroup;
|
||||||
group.rotate = group.rotate or group:CreateAnimation("rotation");
|
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
|
-- 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
|
-- 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
|
-- 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
|
-- 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
|
-- But anchoring the text to UIParent before re-anchoring it correctly does seem to fix
|
||||||
-- the issue. Also see #1778
|
-- the issue. Also see #1778
|
||||||
text:SetPoint("CENTER", UIParent, "CENTER")
|
text:SetPoint("CENTER", UIParent, "CENTER")
|
||||||
|
|
||||||
|
|||||||
@@ -746,25 +746,25 @@ local function recurseStringify(data, level, lines)
|
|||||||
for k, v in pairs(data) do
|
for k, v in pairs(data) do
|
||||||
local lineFormat = strrep(" ", level) .. "[%s] = %s"
|
local lineFormat = strrep(" ", level) .. "[%s] = %s"
|
||||||
local form1, form2, value
|
local form1, form2, value
|
||||||
local ktype, vtype = type(k), type(v)
|
local kType, vType = type(k), type(v)
|
||||||
if ktype == "string" then
|
if kType == "string" then
|
||||||
form1 = "%q"
|
form1 = "%q"
|
||||||
elseif ktype == "number" then
|
elseif kType == "number" then
|
||||||
form1 = "%d"
|
form1 = "%d"
|
||||||
else
|
else
|
||||||
form1 = "%s"
|
form1 = "%s"
|
||||||
end
|
end
|
||||||
if vtype == "string" then
|
if vType == "string" then
|
||||||
form2 = "%q"
|
form2 = "%q"
|
||||||
v = v:gsub("\\", "\\\\"):gsub("\n", "\\n"):gsub("\"", "\\\"")
|
v = v:gsub("\\", "\\\\"):gsub("\n", "\\n"):gsub("\"", "\\\"")
|
||||||
elseif vtype == "boolean" then
|
elseif vType == "boolean" then
|
||||||
v = tostring(v)
|
v = tostring(v)
|
||||||
form2 = "%s"
|
form2 = "%s"
|
||||||
else
|
else
|
||||||
form2 = "%s"
|
form2 = "%s"
|
||||||
end
|
end
|
||||||
lineFormat = lineFormat:format(form1, form2)
|
lineFormat = lineFormat:format(form1, form2)
|
||||||
if vtype == "table" then
|
if vType == "table" then
|
||||||
tinsert(lines, lineFormat:format(k, "{"))
|
tinsert(lines, lineFormat:format(k, "{"))
|
||||||
recurseStringify(v, level + 1, lines)
|
recurseStringify(v, level + 1, lines)
|
||||||
tinsert(lines, strrep(" ", level) .. "},")
|
tinsert(lines, strrep(" ", level) .. "},")
|
||||||
|
|||||||
+51
-57
@@ -722,38 +722,38 @@ function WeakAuras.GetActiveConditions(id, cloneId)
|
|||||||
return triggerState[id].activatedConditions[cloneId];
|
return triggerState[id].activatedConditions[cloneId];
|
||||||
end
|
end
|
||||||
|
|
||||||
local function formatValueForAssignment(vtype, value, pathToCustomFunction)
|
local function formatValueForAssignment(vType, value, pathToCustomFunction)
|
||||||
if (value == nil) then
|
if (value == nil) then
|
||||||
value = false;
|
value = false;
|
||||||
end
|
end
|
||||||
if (vtype == "bool") then
|
if (vType == "bool") then
|
||||||
return value and tostring(value) or "false";
|
return value and tostring(value) or "false";
|
||||||
elseif(vtype == "number") then
|
elseif(vType == "number") then
|
||||||
return value and tostring(value) or "0";
|
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";
|
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
|
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]));
|
return string.format("{%s, %s, %s, %s}", tostring(value[1]), tostring(value[2]), tostring(value[3]), tostring(value[4]));
|
||||||
end
|
end
|
||||||
return "{1, 1, 1, 1}";
|
return "{1, 1, 1, 1}";
|
||||||
elseif(vtype == "chat") then
|
elseif(vType == "chat") then
|
||||||
if (value and type(value) == "table") 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}",
|
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_type), tostring(value.message or ""),
|
||||||
tostring(value.message_dest), tostring(value.message_channel),
|
tostring(value.message_dest), tostring(value.message_channel),
|
||||||
pathToCustomFunction);
|
pathToCustomFunction);
|
||||||
end
|
end
|
||||||
elseif(vtype == "sound") then
|
elseif(vType == "sound") then
|
||||||
if (value and type(value) == "table") 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}",
|
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 or ""), tostring(value.sound_channel or ""), tostring(value.sound_path or ""),
|
||||||
tostring(value.sound_kit_id or ""), tostring(value.sound_type or ""),
|
tostring(value.sound_kit_id or ""), tostring(value.sound_type or ""),
|
||||||
value.sound_repeat and "sound_repeat = " .. tostring(value.sound_repeat) or "nil");
|
value.sound_repeat and "sound_repeat = " .. tostring(value.sound_repeat) or "nil");
|
||||||
end
|
end
|
||||||
elseif(vtype == "customcode") then
|
elseif(vType == "customcode") then
|
||||||
return string.format("%s", pathToCustomFunction);
|
return string.format("%s", pathToCustomFunction);
|
||||||
elseif vtype == "glowexternal" then
|
elseif vType == "glowexternal" then
|
||||||
if (value and type(value) == "table") then
|
if (value and type(value) == "table") then
|
||||||
return ([[{ glow_action = %q, glow_frame_type = %q, glow_type = %q,
|
return ([[{ glow_action = %q, glow_frame_type = %q, glow_type = %q,
|
||||||
glow_frame = %q, use_glow_color = %s, glow_color = {%s, %s, %s, %s},
|
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;
|
usedStates[trigger] = true;
|
||||||
|
|
||||||
local conditionTemplate = allConditionsTemplate[trigger] and allConditionsTemplate[trigger][variable];
|
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 test = conditionTemplate and conditionTemplate.test;
|
||||||
|
|
||||||
local stateCheck = "state[" .. trigger .. "] and state[" .. trigger .. "].show and ";
|
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;
|
local opString = type(op) == "string" and "[[" .. op .. "]]" or op;
|
||||||
check = "state and WeakAuras.CallCustomConditionTest(" .. testFunctionNumber .. ", state[" .. trigger .. "], " .. valueString .. ", " .. (opString or "nil") .. ")";
|
check = "state and WeakAuras.CallCustomConditionTest(" .. testFunctionNumber .. ", state[" .. trigger .. "], " .. valueString .. ", " .. (opString or "nil") .. ")";
|
||||||
end
|
end
|
||||||
elseif (ctype == "number" and op) then
|
elseif (cType == "number" and op) then
|
||||||
local v = tonumber(value)
|
local v = tonumber(value)
|
||||||
if (v) then
|
if (v) then
|
||||||
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. v;
|
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. v;
|
||||||
end
|
end
|
||||||
elseif (ctype == "timer" and op) then
|
elseif (cType == "timer" and op) then
|
||||||
if (op == "==") then
|
if (op == "==") then
|
||||||
check = stateCheck .. stateVariableCheck .. "abs(state[" .. trigger .. "]." ..variable .. "- now -" .. value .. ") < 0.05";
|
check = stateCheck .. stateVariableCheck .. "abs(state[" .. trigger .. "]." ..variable .. "- now -" .. value .. ") < 0.05";
|
||||||
else
|
else
|
||||||
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. "- now" .. op .. value;
|
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. "- now" .. op .. value;
|
||||||
end
|
end
|
||||||
elseif (ctype == "select" and op) then
|
elseif (cType == "select" and op) then
|
||||||
if (tonumber(value)) then
|
if (tonumber(value)) then
|
||||||
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. tonumber(value);
|
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. tonumber(value);
|
||||||
else
|
else
|
||||||
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. "'" .. value .. "'";
|
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. op .. "'" .. value .. "'";
|
||||||
end
|
end
|
||||||
elseif (ctype == "bool") then
|
elseif (cType == "bool") then
|
||||||
local rightSide = value == 0 and "false" or "true";
|
local rightSide = value == 0 and "false" or "true";
|
||||||
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. "==" .. rightSide
|
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. "==" .. rightSide
|
||||||
elseif (ctype == "string") then
|
elseif (cType == "string") then
|
||||||
if(op == "==") then
|
if(op == "==") then
|
||||||
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. " == [[" .. value .. "]]";
|
check = stateCheck .. stateVariableCheck .. "state[" .. trigger .. "]." .. variable .. " == [[" .. value .. "]]";
|
||||||
elseif (op == "find('%s')") then
|
elseif (op == "find('%s')") then
|
||||||
@@ -912,7 +912,7 @@ local function CreateTestForCondition(input, allConditionsTemplate, usedStates)
|
|||||||
end
|
end
|
||||||
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 = " 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 .. " if (nextTime and (not recheckTime or nextTime < recheckTime) and nextTime >= now) then\n"
|
||||||
recheckCode = recheckCode .. " recheckTime = nextTime\n";
|
recheckCode = recheckCode .. " recheckTime = nextTime\n";
|
||||||
@@ -1339,8 +1339,8 @@ end
|
|||||||
|
|
||||||
function WeakAuras.RegisterForGlobalConditions(id)
|
function WeakAuras.RegisterForGlobalConditions(id)
|
||||||
local data = WeakAuras.GetData(id);
|
local data = WeakAuras.GetData(id);
|
||||||
for event, conditonFunctions in pairs(dynamicConditions) do
|
for event, conditionFunctions in pairs(dynamicConditions) do
|
||||||
conditonFunctions.id = nil;
|
conditionFunctions.id = nil;
|
||||||
end
|
end
|
||||||
|
|
||||||
local register = {};
|
local register = {};
|
||||||
@@ -1462,9 +1462,9 @@ WeakAuras.frames["LDB Tooltip Updater"] = tooltip_update_frame;
|
|||||||
local function getAnchors(frame)
|
local function getAnchors(frame)
|
||||||
local x, y = frame:GetCenter()
|
local x, y = frame:GetCenter()
|
||||||
if not x or not y then return "CENTER" end
|
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 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"
|
local vHalf = (y > UIParent:GetHeight()/2) and "TOP" or "BOTTOM"
|
||||||
return vhalf..hhalf, frame, (vhalf == "TOP" and "BOTTOM" or "TOP")..hhalf
|
return vHalf..hHalf, frame, (vHalf == "TOP" and "BOTTOM" or "TOP")..hHalf
|
||||||
end
|
end
|
||||||
|
|
||||||
local Broker_WeakAuras;
|
local Broker_WeakAuras;
|
||||||
@@ -3709,7 +3709,7 @@ function WeakAuras.SyncParentChildRelationships(silent)
|
|||||||
-- 1. Find all auras where data.parent ~= nil or data.controlledChildren ~= nil
|
-- 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 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 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:
|
-- 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 doesn't exist in the database
|
||||||
-- The child ID is duplicated in data.controlledChildren (only the first will be kept)
|
-- 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;
|
clonePool[regionType][#clonePool[regionType] + 1] = region;
|
||||||
end
|
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
|
if (message:find('%%')) then
|
||||||
message = WeakAuras.ReplacePlaceHolders(message, region, customFunc);
|
message = WeakAuras.ReplacePlaceHolders(message, region, customFunc, useHiddenStates);
|
||||||
end
|
end
|
||||||
if(message_type == "PRINT") then
|
if(message_type == "PRINT") then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(message, r or 1, g or 1, b or 1);
|
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);
|
pcall(function() SendChatMessage(message, "WHISPER", nil, message_dest) end);
|
||||||
end
|
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
|
elseif(message_type == "SMARTRAID") then
|
||||||
local isInstanceGroup = IsInGroup(LE_PARTY_CATEGORY_INSTANCE)
|
|
||||||
if UnitInBattleground("player") then
|
if UnitInBattleground("player") then
|
||||||
pcall(function() SendChatMessage(message, "CHAT_MSG_BATTLEGROUND") end)
|
pcall(function() SendChatMessage(message, "CHAT_MSG_BATTLEGROUND") end)
|
||||||
elseif UnitInRaid("player") then
|
elseif UnitInRaid("player") then
|
||||||
pcall(function() SendChatMessage(message, "RAID") end)
|
pcall(function() SendChatMessage(message, "RAID") end)
|
||||||
elseif UnitInParty("player") then
|
elseif UnitInParty("player") then
|
||||||
if isInstanceGroup then
|
pcall(function() SendChatMessage(message, "PARTY") end)
|
||||||
pcall(function() SendChatMessage(message, "CHAT_MSG_BATTLEGROUND") end)
|
|
||||||
else
|
|
||||||
pcall(function() SendChatMessage(message, "PARTY") end)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
if IsInInstance() then
|
if IsInInstance() then
|
||||||
pcall(function() SendChatMessage(message, "SAY") end)
|
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
|
if(actions.do_message and actions.message_type and actions.message) then
|
||||||
local customFunc = WeakAuras.customActionsFunctions[data.id][when .. "_message"];
|
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
|
end
|
||||||
|
|
||||||
if (actions.stop_sound) then
|
if (actions.stop_sound) then
|
||||||
@@ -5899,11 +5890,12 @@ local function evaluateTriggerStateTriggers(id)
|
|||||||
result = true;
|
result = true;
|
||||||
else
|
else
|
||||||
if (triggerState[id].disjunctive == "custom" and triggerState[id].triggerLogicFunc) then
|
if (triggerState[id].disjunctive == "custom" and triggerState[id].triggerLogicFunc) then
|
||||||
local ok
|
local ok, returnValue = pcall(triggerState[id].triggerLogicFunc, triggerState[id].triggers);
|
||||||
ok, result = pcall(triggerState[id].triggerLogicFunc, triggerState[id].triggers);
|
|
||||||
if not ok then
|
if not ok then
|
||||||
geterrorhandler()(result)
|
geterrorhandler()(returnValue)
|
||||||
result = false
|
result = false
|
||||||
|
else
|
||||||
|
result = returnValue
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -6121,7 +6113,7 @@ local function ReplaceValuePlaceHolders(textStr, region, customFunc, state)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- States:
|
-- 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
|
-- 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
|
-- 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
|
-- 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)
|
return ContainsPlaceHolders(textStr, function(symbol) return true end)
|
||||||
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, "(.+)%.(.+)")
|
local triggerNum, sym = string.match(symbol, "(.+)%.(.+)")
|
||||||
triggerNum = triggerNum and tonumber(triggerNum)
|
triggerNum = triggerNum and tonumber(triggerNum)
|
||||||
if triggerNum and sym then
|
if triggerNum and sym then
|
||||||
if regionStates and regionStates[triggerNum] then
|
if regionStates[triggerNum] then
|
||||||
if regionStates[triggerNum][sym] then
|
if (useHiddenStates or regionStates[triggerNum].show) then
|
||||||
return tostring(regionStates[triggerNum][sym]) or ""
|
if regionStates[triggerNum][sym] then
|
||||||
else
|
return tostring(regionStates[triggerNum][sym]) or ""
|
||||||
local value = ReplaceValuePlaceHolders(sym, region, customFunc, regionStates[triggerNum]);
|
else
|
||||||
return value or ""
|
local value = ReplaceValuePlaceHolders(sym, region, customFunc, regionStates[triggerNum]);
|
||||||
|
return value or ""
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return ""
|
return ""
|
||||||
elseif regionState and regionState[symbol] then
|
elseif regionState[symbol] then
|
||||||
return regionState.show and tostring(regionState[symbol]) or ""
|
return (useHiddenStates or regionState.show) and tostring(regionState[symbol]) or ""
|
||||||
else
|
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 ""
|
return value or ""
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
|
function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc, useHiddenStates)
|
||||||
local regionValues = region.values;
|
local regionValues = region.values;
|
||||||
local regionState = region.state;
|
local regionState = region.state or {};
|
||||||
local regionStates = region.states;
|
local regionStates = region.states or {};
|
||||||
if (not regionState and not regionValues) then
|
if (not regionState and not regionValues) then
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
@@ -6269,7 +6263,7 @@ function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
|
|||||||
|
|
||||||
if (endPos == 2) then
|
if (endPos == 2) then
|
||||||
if string.byte(textStr, 1) == 37 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
|
if (value) then
|
||||||
textStr = tostring(value);
|
textStr = tostring(value);
|
||||||
end
|
end
|
||||||
@@ -6307,7 +6301,7 @@ function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
|
|||||||
-- 0-9a-zA-Z or dot character
|
-- 0-9a-zA-Z or dot character
|
||||||
else -- End of variable
|
else -- End of variable
|
||||||
local symbol = string.sub(textStr, start, currentPos - 1)
|
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
|
if char == 37 then
|
||||||
else
|
else
|
||||||
@@ -6317,7 +6311,7 @@ function WeakAuras.ReplacePlaceHolders(textStr, region, customFunc)
|
|||||||
elseif state == 3 then
|
elseif state == 3 then
|
||||||
if char == 125 then -- } closing brace
|
if char == 125 then -- } closing brace
|
||||||
local symbol = string.sub(textStr, start, currentPos - 1)
|
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
|
start = currentPos + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -6446,7 +6440,7 @@ local function ensureMouseFrame()
|
|||||||
local optionsFrame = WeakAuras.OptionsFrame();
|
local optionsFrame = WeakAuras.OptionsFrame();
|
||||||
local yOffset = (optionsFrame:GetTop() + optionsFrame:GetBottom()) / 2;
|
local yOffset = (optionsFrame:GetTop() + optionsFrame:GetBottom()) / 2;
|
||||||
local xOffset = xPositionNextToOptions();
|
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:ClearAllPoints();
|
||||||
mouseFrame:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", xOffset - GetScreenWidth(), yOffset - GetScreenHeight());
|
mouseFrame:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", xOffset - GetScreenWidth(), yOffset - GetScreenHeight());
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## Interface: 80300
|
## Interface: 30300
|
||||||
## Title: WeakAuras 2
|
## Title: WeakAuras 2
|
||||||
## Author: Mirrored and the WeakAuras Team
|
## 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: 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-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.
|
## Notes-deDE: Ein leistungsfähiges, umfassendes Addon zur grafischen Darstellung von Informationen von Auren, Cooldowns, Timern und vielem mehr.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## Interface: 80300
|
## Interface: 30300
|
||||||
## Title: WeakAuras Archive
|
## Title: WeakAuras Archive
|
||||||
## LoadOnDemand: 1
|
## LoadOnDemand: 1
|
||||||
## SavedVariables: WeakAurasArchive
|
## SavedVariables: WeakAurasArchive
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## Interface: 80205
|
## Interface: 30300
|
||||||
## Title: WeakAuras Model Paths
|
## Title: WeakAuras Model Paths
|
||||||
## Author: Mirrored and the WeakAuras Team
|
## Author: Mirrored and the WeakAuras Team
|
||||||
## Version: 2.16.0-beta1
|
## 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 select, pairs, next, type, unpack = select, pairs, next, type, unpack
|
||||||
local tostring, error = tostring, error
|
local tostring, error = tostring, error
|
||||||
|
|
||||||
local Type, Version = "WeakAurasDisplayButton", 53
|
local Type, Version = "WeakAurasDisplayButton", 54
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@@ -1670,7 +1670,7 @@ local methods = {
|
|||||||
return self.frame:IsEnabled();
|
return self.frame:IsEnabled();
|
||||||
end,
|
end,
|
||||||
["OnRelease"] = function(self)
|
["OnRelease"] = function(self)
|
||||||
self:ReleaseThumnail()
|
self:ReleaseThumbnail()
|
||||||
self:SetViewRegion();
|
self:SetViewRegion();
|
||||||
self:Enable();
|
self:Enable();
|
||||||
self:SetGroup();
|
self:SetGroup();
|
||||||
@@ -1695,8 +1695,8 @@ local methods = {
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.data.regionType ~= self.thumbnailType then
|
if self.data.regionType ~= self.thumbnailType then
|
||||||
self:ReleaseThumnail()
|
self:ReleaseThumbnail()
|
||||||
self:AcquireThumnail()
|
self:AcquireThumbnail()
|
||||||
else
|
else
|
||||||
local option = WeakAuras.regionOptions[self.thumbnailType]
|
local option = WeakAuras.regionOptions[self.thumbnailType]
|
||||||
if option and option.modifyThumbnail then
|
if option and option.modifyThumbnail then
|
||||||
@@ -1704,7 +1704,7 @@ local methods = {
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
["ReleaseThumnail"] = function(self)
|
["ReleaseThumbnail"] = function(self)
|
||||||
if not self.hasThumbnail then
|
if not self.hasThumbnail then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -1717,7 +1717,7 @@ local methods = {
|
|||||||
self.thumbnail = nil
|
self.thumbnail = nil
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
["AcquireThumnail"] = function(self)
|
["AcquireThumbnail"] = function(self)
|
||||||
if self.hasThumbnail then
|
if self.hasThumbnail then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -2044,9 +2044,9 @@ local function Constructor()
|
|||||||
-- Update in group icon
|
-- Update in group icon
|
||||||
groupUpdate = CreateFrame("BUTTON", nil, button)
|
groupUpdate = CreateFrame("BUTTON", nil, button)
|
||||||
button.groupUpdate = groupUpdate
|
button.groupUpdate = groupUpdate
|
||||||
local gtex = groupUpdate:CreateTexture(nil, "OVERLAY")
|
local gTex = groupUpdate:CreateTexture(nil, "OVERLAY")
|
||||||
gtex:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]])
|
gTex:SetTexture([[Interface\AddOns\WeakAuras\Media\Textures\wagoupdate_logo.tga]])
|
||||||
gtex:SetAllPoints()
|
gTex:SetAllPoints()
|
||||||
groupUpdate:SetSize(16, 16)
|
groupUpdate:SetSize(16, 16)
|
||||||
groupUpdate:SetPoint("BOTTOM", button, "BOTTOM")
|
groupUpdate:SetPoint("BOTTOM", button, "BOTTOM")
|
||||||
groupUpdate:SetPoint("LEFT", icon, "RIGHT", 20, 0)
|
groupUpdate:SetPoint("LEFT", icon, "RIGHT", 20, 0)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
if not WeakAuras.IsCorrectVersion() then return end
|
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)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ local methods = {
|
|||||||
self.frame:SetScript("OnClick", func);
|
self.frame:SetScript("OnClick", func);
|
||||||
end,
|
end,
|
||||||
["SetIcon"] = function(self, icon)
|
["SetIcon"] = function(self, icon)
|
||||||
self:ReleaseThumnail()
|
self:ReleaseThumbnail()
|
||||||
if(type(icon) == "string" or type(icon) == "number") then
|
if(type(icon) == "string" or type(icon) == "number") then
|
||||||
self.icon:SetTexture(icon);
|
self.icon:SetTexture(icon);
|
||||||
self.icon:Show();
|
self.icon:Show();
|
||||||
@@ -63,7 +63,7 @@ local methods = {
|
|||||||
self.thumbnailType = regionType
|
self.thumbnailType = regionType
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
["ReleaseThumnail"] = function(self)
|
["ReleaseThumbnail"] = function(self)
|
||||||
if self.thumbnail then
|
if self.thumbnail then
|
||||||
local regionData = WeakAuras.regionOptions[self.thumbnailType]
|
local regionData = WeakAuras.regionOptions[self.thumbnailType]
|
||||||
if regionData and regionData.releaseThumbnail then
|
if regionData and regionData.releaseThumbnail then
|
||||||
@@ -74,7 +74,7 @@ local methods = {
|
|||||||
self.thumbnailType = nil
|
self.thumbnailType = nil
|
||||||
end,
|
end,
|
||||||
["OnRelease"] = function(self)
|
["OnRelease"] = function(self)
|
||||||
self:ReleaseThumnail()
|
self:ReleaseThumbnail()
|
||||||
if(self.iconRegion and self.iconRegion.Hide) then
|
if(self.iconRegion and self.iconRegion.Hide) then
|
||||||
self.iconRegion:Hide();
|
self.iconRegion:Hide();
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
ToolbarButton Widget, based on AceGUI Button
|
ToolbarButton Widget, based on AceGUI Button
|
||||||
Graphical Button.
|
Graphical Button.
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local Type, Version = "WeakAurasToolbarButton", 3
|
local Type, Version = "WeakAurasToolbarButton", 4
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ local methods = {
|
|||||||
self:SetWidth(32)
|
self:SetWidth(32)
|
||||||
self:SetDisabled(false)
|
self:SetDisabled(false)
|
||||||
self:SetText()
|
self:SetText()
|
||||||
self.htex:SetVertexColor(1, 1, 1, 0.1)
|
self.hTex:SetVertexColor(1, 1, 1, 0.1)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- ["OnRelease"] = nil,
|
-- ["OnRelease"] = nil,
|
||||||
@@ -70,9 +70,9 @@ local methods = {
|
|||||||
end,
|
end,
|
||||||
["SetStrongHighlight"] = function(self, enable)
|
["SetStrongHighlight"] = function(self, enable)
|
||||||
if enable then
|
if enable then
|
||||||
self.htex:SetVertexColor(1, 1, 1, 0.3)
|
self.hTex:SetVertexColor(1, 1, 1, 0.3)
|
||||||
else
|
else
|
||||||
self.htex:SetVertexColor(1, 1, 1, 0.1)
|
self.hTex:SetVertexColor(1, 1, 1, 0.1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -105,24 +105,24 @@ local function Constructor()
|
|||||||
text:SetPoint("BOTTOMRIGHT", -4, 1)
|
text:SetPoint("BOTTOMRIGHT", -4, 1)
|
||||||
text:SetJustifyV("MIDDLE")
|
text:SetJustifyV("MIDDLE")
|
||||||
|
|
||||||
--local ntex = frame:CreateTexture()
|
--local nTex = frame:CreateTexture()
|
||||||
--ntex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
|
--nTex:SetTexture("Interface/Buttons/UI-Panel-Button-Up")
|
||||||
--ntex:SetTexCoord(0, 0.625, 0, 0.6875)
|
--nTex:SetTexCoord(0, 0.625, 0, 0.6875)
|
||||||
--ntex:SetAllPoints()
|
--nTex:SetAllPoints()
|
||||||
--frame:SetNormalTexture(ntex)
|
--frame:SetNormalTexture(nTex)
|
||||||
|
|
||||||
local htex = frame:CreateTexture()
|
local hTex = frame:CreateTexture()
|
||||||
htex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
hTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
||||||
htex:SetVertexColor(1, 1, 1, 0.1)
|
hTex:SetVertexColor(1, 1, 1, 0.1)
|
||||||
|
|
||||||
htex:SetAllPoints()
|
hTex:SetAllPoints()
|
||||||
frame:SetHighlightTexture(htex)
|
frame:SetHighlightTexture(hTex)
|
||||||
|
|
||||||
local ptex = frame:CreateTexture()
|
local pTex = frame:CreateTexture()
|
||||||
ptex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
pTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite")
|
||||||
ptex:SetVertexColor(1, 1, 1, 0.2)
|
pTex:SetVertexColor(1, 1, 1, 0.2)
|
||||||
ptex:SetAllPoints()
|
pTex:SetAllPoints()
|
||||||
frame:SetPushedTexture(ptex)
|
frame:SetPushedTexture(pTex)
|
||||||
|
|
||||||
|
|
||||||
local widget = {
|
local widget = {
|
||||||
@@ -130,7 +130,7 @@ local function Constructor()
|
|||||||
icon = icon,
|
icon = icon,
|
||||||
frame = frame,
|
frame = frame,
|
||||||
type = Type,
|
type = Type,
|
||||||
htex = htex
|
hTex = hTex
|
||||||
}
|
}
|
||||||
for method, func in pairs(methods) do
|
for method, func in pairs(methods) do
|
||||||
widget[method] = func
|
widget[method] = func
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ function WeakAuras.AddActionOption(id, data)
|
|||||||
name = "",
|
name = "",
|
||||||
order = 3,
|
order = 3,
|
||||||
image = function() return "", 0, 0 end,
|
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 = {
|
start_message_color = {
|
||||||
type = "color",
|
type = "color",
|
||||||
@@ -127,14 +127,6 @@ function WeakAuras.AddActionOption(id, data)
|
|||||||
disabled = function() return not data.actions.start.do_message end,
|
disabled = function() return not data.actions.start.do_message end,
|
||||||
hidden = function() return data.actions.start.message_type ~= "WHISPER" 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 = {
|
start_message = {
|
||||||
type = "input",
|
type = "input",
|
||||||
width = WeakAuras.doubleWidth,
|
width = WeakAuras.doubleWidth,
|
||||||
@@ -489,7 +481,7 @@ function WeakAuras.AddActionOption(id, data)
|
|||||||
name = "",
|
name = "",
|
||||||
order = 23,
|
order = 23,
|
||||||
image = function() return "", 0, 0 end,
|
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 = {
|
finish_message_color = {
|
||||||
type = "color",
|
type = "color",
|
||||||
@@ -514,14 +506,6 @@ function WeakAuras.AddActionOption(id, data)
|
|||||||
disabled = function() return not data.actions.finish.do_message end,
|
disabled = function() return not data.actions.finish.do_message end,
|
||||||
hidden = function() return data.actions.finish.message_type ~= "WHISPER" 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 = {
|
finish_message = {
|
||||||
type = "input",
|
type = "input",
|
||||||
width = WeakAuras.doubleWidth,
|
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);
|
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);
|
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);
|
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);
|
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);
|
32, function() return not data.actions.finish.do_custom end, {"actions", "finish", "custom"}, true);
|
||||||
|
|
||||||
return action;
|
return action;
|
||||||
|
|||||||
@@ -846,93 +846,93 @@ function WeakAuras.AddAnimationOption(id, data)
|
|||||||
local function hideStartAlphaFunc()
|
local function hideStartAlphaFunc()
|
||||||
return data.animation.start.type ~= "custom" or data.animation.start.alphaType ~= "custom" or not data.animation.start.use_alpha
|
return data.animation.start.type ~= "custom" or data.animation.start.alphaType ~= "custom" or not data.animation.start.use_alpha
|
||||||
end
|
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);
|
35.3, hideStartAlphaFunc, {"animation", "start", "alphaFunc"}, false);
|
||||||
|
|
||||||
local function hideStartTranslate()
|
local function hideStartTranslate()
|
||||||
return data.animation.start.type ~= "custom" or data.animation.start.translateType ~= "custom" or not data.animation.start.use_translate
|
return data.animation.start.type ~= "custom" or data.animation.start.translateType ~= "custom" or not data.animation.start.use_translate
|
||||||
end
|
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);
|
39.3, hideStartTranslate, {"animation", "start", "translateFunc"}, false);
|
||||||
|
|
||||||
local function hideStartScale()
|
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)
|
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
|
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);
|
43.3, hideStartScale, {"animation", "start", "scaleFunc"}, false);
|
||||||
|
|
||||||
local function hideStartRotateFunc()
|
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)
|
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
|
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);
|
47.3, hideStartRotateFunc, {"animation", "start", "rotateFunc"}, false);
|
||||||
|
|
||||||
local function hideStartColorFunc()
|
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)
|
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
|
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);
|
48.7, hideStartColorFunc, {"animation", "start", "colorFunc"}, false);
|
||||||
|
|
||||||
-- Text Editors for "main"
|
-- Text Editors for "main"
|
||||||
local function hideMainAlphaFunc()
|
local function hideMainAlphaFunc()
|
||||||
return data.animation.main.type ~= "custom" or data.animation.main.alphaType ~= "custom" or not data.animation.main.use_alpha
|
return data.animation.main.type ~= "custom" or data.animation.main.alphaType ~= "custom" or not data.animation.main.use_alpha
|
||||||
end
|
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);
|
55.3, hideMainAlphaFunc, {"animation", "main", "alphaFunc"}, false, nil, extraSetFunction);
|
||||||
|
|
||||||
local function hideMainTranslate()
|
local function hideMainTranslate()
|
||||||
return data.animation.main.type ~= "custom" or data.animation.main.translateType ~= "custom" or not data.animation.main.use_translate
|
return data.animation.main.type ~= "custom" or data.animation.main.translateType ~= "custom" or not data.animation.main.use_translate
|
||||||
end
|
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);
|
59.3, hideMainTranslate, {"animation", "main", "translateFunc"}, false, nil, extraSetFunction);
|
||||||
|
|
||||||
local function hideMainScale()
|
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)
|
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
|
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);
|
63.3, hideMainScale, {"animation", "main", "scaleFunc"}, false, nil, extraSetFunction);
|
||||||
|
|
||||||
local function hideMainRotateFunc()
|
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)
|
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
|
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);
|
67.3, hideMainRotateFunc, {"animation", "main", "rotateFunc"}, false, nil, extraSetFunction);
|
||||||
|
|
||||||
local function hideMainColorFunc()
|
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)
|
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
|
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);
|
68.7, hideMainColorFunc, {"animation", "main", "colorFunc"}, false, nil, extraSetFunction);
|
||||||
|
|
||||||
-- Text Editors for "finish"
|
-- Text Editors for "finish"
|
||||||
local function hideFinishAlphaFunc()
|
local function hideFinishAlphaFunc()
|
||||||
return data.animation.finish.type ~= "custom" or data.animation.finish.alphaType ~= "custom" or not data.animation.finish.use_alpha
|
return data.animation.finish.type ~= "custom" or data.animation.finish.alphaType ~= "custom" or not data.animation.finish.use_alpha
|
||||||
end
|
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);
|
75.3, hideFinishAlphaFunc, {"animation", "finish", "alphaFunc"}, false);
|
||||||
|
|
||||||
local function hideFinishTranslate()
|
local function hideFinishTranslate()
|
||||||
return data.animation.finish.type ~= "custom" or data.animation.finish.translateType ~= "custom" or not data.animation.finish.use_translate
|
return data.animation.finish.type ~= "custom" or data.animation.finish.translateType ~= "custom" or not data.animation.finish.use_translate
|
||||||
end
|
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);
|
79.3, hideFinishTranslate, {"animation", "finish", "translateFunc"}, false);
|
||||||
|
|
||||||
local function hideFinishScale()
|
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)
|
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
|
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);
|
83.3, hideFinishScale, {"animation", "finish", "scaleFunc"}, false);
|
||||||
|
|
||||||
local function hideFinishRotateFunc()
|
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)
|
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
|
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);
|
87.3, hideFinishRotateFunc, {"animation", "finish", "rotateFunc"}, false);
|
||||||
|
|
||||||
local function hideFinishColorFunc()
|
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)
|
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
|
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);
|
88.7, hideFinishColorFunc, {"animation", "finish", "colorFunc"}, false);
|
||||||
|
|
||||||
return animation;
|
return animation;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
width (required) -> number between 0.1 and 2 (softMin of 0.5). Determines the width of the option.
|
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.
|
useDesc (optional) -> bool. If false, then the tooltip will not be used.
|
||||||
desc (optional) -> string to be displayed in the option tooltip
|
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
|
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:
|
Supported option types, and additional fields that each type supports/requires:
|
||||||
group -> represents a group of options.
|
group -> represents a group of options.
|
||||||
|
|||||||
@@ -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
|
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 = {
|
useGroup_count = {
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
width = WeakAuras.normalWidth,
|
width = WeakAuras.normalWidth,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
-- - variable: Variable inside the trigger state to check
|
-- - variable: Variable inside the trigger state to check
|
||||||
-- - op: Operator to use for check
|
-- - op: Operator to use for check
|
||||||
-- - value: Value to 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
|
-- - (for merged) references
|
||||||
-- - id => conditionIndex
|
-- - id => conditionIndex
|
||||||
-- => op
|
-- => op
|
||||||
@@ -677,22 +677,6 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
|
|||||||
}
|
}
|
||||||
order = order + 1;
|
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);
|
local descMessage = descIfNoValue2(data, conditions[i].changes[j], "value", "message", propertyType);
|
||||||
if (not descMessage and data ~= WeakAuras.tempGroup) then
|
if (not descMessage and data ~= WeakAuras.tempGroup) then
|
||||||
descMessage = L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
|
descMessage = L["Dynamic text tooltip"] .. WeakAuras.GetAdditionalProperties(data)
|
||||||
@@ -743,9 +727,9 @@ local function addControlsForChange(args, order, data, conditionVariable, condit
|
|||||||
local changeIndex = reference.changeIndex;
|
local changeIndex = reference.changeIndex;
|
||||||
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
|
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
|
||||||
end
|
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
|
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
|
||||||
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 {};
|
childData.conditions[conditionIndex].changes[changeIndex].value = childData.conditions[conditionIndex].changes[changeIndex].value or {};
|
||||||
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
|
multipath[id] = {"conditions", conditionIndex, "changes", changeIndex, "value", "custom"};
|
||||||
end
|
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
|
else
|
||||||
data.conditions[i].changes[j].value = data.conditions[i].changes[j].value or {};
|
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
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
@@ -1957,7 +1941,7 @@ local function createConditionTemplates(data)
|
|||||||
return conditionTemplates, conditionTemplateWithoutCombinations;
|
return conditionTemplates, conditionTemplateWithoutCombinations;
|
||||||
end
|
end
|
||||||
|
|
||||||
local function buildAllPotentialProperies(data, category)
|
local function buildAllPotentialProperties(data, category)
|
||||||
local allProperties = {};
|
local allProperties = {};
|
||||||
allProperties.propertyMap = {};
|
allProperties.propertyMap = {};
|
||||||
if (data.controlledChildren) then
|
if (data.controlledChildren) then
|
||||||
@@ -2276,7 +2260,7 @@ function WeakAuras.GetConditionOptions(data, args, conditionVariable, startorder
|
|||||||
local conditionTemplates, conditionTemplateWithoutCombinations = createConditionTemplates(data);
|
local conditionTemplates, conditionTemplateWithoutCombinations = createConditionTemplates(data);
|
||||||
|
|
||||||
-- Build potential properties structure
|
-- Build potential properties structure
|
||||||
local allProperties = buildAllPotentialProperies(data, category);
|
local allProperties = buildAllPotentialProperties(data, category);
|
||||||
|
|
||||||
-- Build currently selected conditions
|
-- Build currently selected conditions
|
||||||
local conditions;
|
local conditions;
|
||||||
|
|||||||
@@ -315,21 +315,21 @@ local function GetCustomTriggerOptions(data, optionTriggerChoices, trigger)
|
|||||||
local function hideCustomTrigger()
|
local function hideCustomTrigger()
|
||||||
return not (trigger.type == "custom")
|
return not (trigger.type == "custom")
|
||||||
end
|
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);
|
10, hideCustomTrigger, appendToTriggerPath("custom"), false, true, extraSetFunction, nil, true);
|
||||||
|
|
||||||
local function hideCustomVariables()
|
local function hideCustomVariables()
|
||||||
return not (trigger.type == "custom" and trigger.custom_type == "stateupdate");
|
return not (trigger.type == "custom" and trigger.custom_type == "stateupdate");
|
||||||
end
|
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);
|
11, hideCustomVariables, appendToTriggerPath("customVariables"), false, true, extraSetFunctionReload, nil, true);
|
||||||
|
|
||||||
local function hideCustomUntrigger()
|
local function hideCustomUntrigger()
|
||||||
return not (trigger.type == "custom"
|
return not (trigger.type == "custom"
|
||||||
and (trigger.custom_type == "status" or (trigger.custom_type == "event" and trigger.custom_hide == "custom")))
|
and (trigger.custom_type == "status" or (trigger.custom_type == "event" and trigger.custom_hide == "custom")))
|
||||||
end
|
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);
|
14, hideCustomUntrigger, appendToUntriggerPath("custom"), false, true, extraSetFunction);
|
||||||
|
|
||||||
local function hideCustomDuration()
|
local function hideCustomDuration()
|
||||||
@@ -337,7 +337,7 @@ local function GetCustomTriggerOptions(data, optionTriggerChoices, trigger)
|
|||||||
and (trigger.custom_type == "status"
|
and (trigger.custom_type == "status"
|
||||||
or (trigger.custom_type == "event" and (trigger.custom_hide ~= "timed" or trigger.dynamicDuration))))
|
or (trigger.custom_type == "event" and (trigger.custom_hide ~= "timed" or trigger.dynamicDuration))))
|
||||||
end
|
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);
|
16, hideCustomDuration, appendToTriggerPath("customDuration"), false, true, extraSetFunctionReload);
|
||||||
|
|
||||||
local function hideIfTriggerStateUpdate()
|
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);
|
17 + i / 10, hideOverlay, appendToTriggerPath("customOverlay" .. i), false, true, extraSetFunctionReload, extraFunctions);
|
||||||
end
|
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);
|
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);
|
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);
|
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);
|
23, hideIfTriggerStateUpdate, appendToTriggerPath("customStacks"), false, true, extraSetFunctionReload);
|
||||||
|
|
||||||
return customOptions;
|
return customOptions;
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ local colorScheme = {
|
|||||||
[IndentationLib.tokens.TOKEN_COMMENT_LONG] = "|c0000aa00",
|
[IndentationLib.tokens.TOKEN_COMMENT_LONG] = "|c0000aa00",
|
||||||
[IndentationLib.tokens.TOKEN_NUMBER] = "|c00ff9900",
|
[IndentationLib.tokens.TOKEN_NUMBER] = "|c00ff9900",
|
||||||
[IndentationLib.tokens.TOKEN_STRING] = "|c00999999",
|
[IndentationLib.tokens.TOKEN_STRING] = "|c00999999",
|
||||||
-- ellipsis, curly braces, table acces
|
-- ellipsis, curly braces, table access
|
||||||
["..."] = tableColor,
|
["..."] = tableColor,
|
||||||
["{"] = tableColor,
|
["{"] = tableColor,
|
||||||
["}"] = tableColor,
|
["}"] = tableColor,
|
||||||
|
|||||||
@@ -875,20 +875,20 @@ local function ConstructMoverSizer(parent)
|
|||||||
end
|
end
|
||||||
local regionScale = self.moving.region:GetScale()
|
local regionScale = self.moving.region:GetScale()
|
||||||
self.text:SetText(("(%.2f, %.2f)"):format(dX*1/regionScale, dY*1/regionScale))
|
self.text:SetText(("(%.2f, %.2f)"):format(dX*1/regionScale, dY*1/regionScale))
|
||||||
local midx = (distance / 2) * cos(angle)
|
local midX = (distance / 2) * cos(angle)
|
||||||
local midy = (distance / 2) * sin(angle)
|
local midY = (distance / 2) * sin(angle)
|
||||||
self.text:SetPoint("CENTER", self.anchorPointIcon, "CENTER", midx, midy)
|
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()
|
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))
|
if (midX > 0 and (self.text:GetRight() or 0) > (left or 0))
|
||||||
or (midx < 0 and (self.text:GetLeft() or 0) < (right or 0))
|
or (midX < 0 and (self.text:GetLeft() or 0) < (right or 0))
|
||||||
then
|
then
|
||||||
if midy > 0 and (self.text:GetTop() or 0) > (top 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))
|
midY = midY - ((self.text:GetTop() or 0) - (bottom or 0))
|
||||||
elseif midy < 0 and (self.text:GetBottom() or 0) < (top or 0) then
|
elseif midY < 0 and (self.text:GetBottom() or 0) < (top or 0) then
|
||||||
midy = midy + ((top or 0) - (self.text:GetBottom() or 0))
|
midY = midY + ((top or 0) - (self.text:GetBottom() or 0))
|
||||||
end
|
end
|
||||||
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 self.isMoving then
|
||||||
if mover.align then
|
if mover.align then
|
||||||
local ctrlDown = IsControlKeyDown()
|
local ctrlDown = IsControlKeyDown()
|
||||||
|
|||||||
@@ -226,13 +226,13 @@ function WeakAuras.CreateFrame()
|
|||||||
|
|
||||||
local title = CreateFrame("Frame", nil, frame)
|
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()))
|
local titleBG = CreateDecorationWide(frame, max(120, titleText:GetWidth()))
|
||||||
titlebg:SetPoint("TOP", 0, 24)
|
titleBG:SetPoint("TOP", 0, 24)
|
||||||
titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
|
titleText:SetPoint("TOP", titleBG, "TOP", 0, -14)
|
||||||
|
|
||||||
|
|
||||||
local function commitWindowChanges()
|
local function commitWindowChanges()
|
||||||
@@ -265,8 +265,8 @@ function WeakAuras.CreateFrame()
|
|||||||
frame:StopMovingOrSizing()
|
frame:StopMovingOrSizing()
|
||||||
commitWindowChanges()
|
commitWindowChanges()
|
||||||
end)
|
end)
|
||||||
title:SetPoint("BOTTOMLEFT", titlebg, "BOTTOMLEFT", -25, 0)
|
title:SetPoint("BOTTOMLEFT", titleBG, "BOTTOMLEFT", -25, 0)
|
||||||
title:SetPoint("TOPRIGHT", titlebg, "TOPRIGHT", 25, 0)
|
title:SetPoint("TOPRIGHT", titleBG, "TOPRIGHT", 25, 0)
|
||||||
|
|
||||||
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMLEFT")
|
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMLEFT")
|
||||||
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMRIGHT")
|
CreateFrameSizer(frame, commitWindowChanges, "BOTTOMRIGHT")
|
||||||
@@ -562,7 +562,7 @@ function WeakAuras.CreateFrame()
|
|||||||
return status.offset, status.offset + self.scrollframe:GetHeight()
|
return status.offset, status.offset + self.scrollframe:GetHeight()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- override SetScroll to make childrens visible as needed
|
-- override SetScroll to make children visible as needed
|
||||||
local oldSetScroll = buttonsScroll.SetScroll
|
local oldSetScroll = buttonsScroll.SetScroll
|
||||||
buttonsScroll.SetScroll = function(self, value)
|
buttonsScroll.SetScroll = function(self, value)
|
||||||
if self:GetScrollPos() ~= value then
|
if self:GetScrollPos() ~= value then
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ local function ConstructTextEditor(frame)
|
|||||||
|
|
||||||
local heading1 = AceGUI:Create("Heading")
|
local heading1 = AceGUI:Create("Heading")
|
||||||
heading1:SetText(L["Premade Snippets"])
|
heading1:SetText(L["Premade Snippets"])
|
||||||
heading1:SetRelativeWidth(1)
|
heading1:SetRelativeWidth(0.7)
|
||||||
frame:AddChild(heading1)
|
frame:AddChild(heading1)
|
||||||
|
|
||||||
-- Iterate premade snippets and make buttons for them
|
-- Iterate premade snippets and make buttons for them
|
||||||
|
|||||||
@@ -459,7 +459,7 @@ local function modifyThumbnail(parent, borderframe, data, fullModify, width, hei
|
|||||||
|
|
||||||
borderframe:SetParent(parent)
|
borderframe:SetParent(parent)
|
||||||
|
|
||||||
-- Defaut size
|
-- Default size
|
||||||
width = width or 26;
|
width = width or 26;
|
||||||
height = height or 15;
|
height = height or 15;
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
37, function() return not WeakAuras.ContainsCustomPlaceHolder(data.displayText) end, {"customText"}, false);
|
||||||
|
|
||||||
return {
|
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)
|
4, hideCustomTextOption, {"customText"}, false)
|
||||||
|
|
||||||
return options, commonTextOptions
|
return options, commonTextOptions
|
||||||
|
|||||||
@@ -2827,7 +2827,7 @@ end
|
|||||||
scheduleRefillFrame.ids = {}
|
scheduleRefillFrame.ids = {}
|
||||||
|
|
||||||
|
|
||||||
-- TODO replace older ReloadOptions, SchduleReloadOptions, ReloadTriggerOptions, ReloadGroupRegionOptions
|
-- TODO replace older ReloadOptions, ScheduleReloadOptions, ReloadTriggerOptions, ReloadGroupRegionOptions
|
||||||
-- automatically clear parent/tempGroup ?
|
-- automatically clear parent/tempGroup ?
|
||||||
function WeakAuras.ReloadOptions2(id, data)
|
function WeakAuras.ReloadOptions2(id, data)
|
||||||
displayOptions[id] = nil
|
displayOptions[id] = nil
|
||||||
@@ -2838,7 +2838,7 @@ function WeakAuras.RefillOptions()
|
|||||||
frame:RefillOptions()
|
frame:RefillOptions()
|
||||||
end
|
end
|
||||||
|
|
||||||
function WeakAuras.SchduleRefillOptions()
|
function WeakAuras.ScheduleRefillOptions()
|
||||||
scheduleRefillFrame:ScheduleRefillOnly()
|
scheduleRefillFrame:ScheduleRefillOnly()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -3329,7 +3329,7 @@ function WeakAuras.ReloadTriggerOptions(data)
|
|||||||
local function hideTriggerCombiner()
|
local function hideTriggerCombiner()
|
||||||
return not (data.triggers.disjunctive == "custom")
|
return not (data.triggers.disjunctive == "custom")
|
||||||
end
|
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);
|
0.1, hideTriggerCombiner, {"triggers", "customTriggerLogic"}, false);
|
||||||
|
|
||||||
local order = 81;
|
local order = 81;
|
||||||
@@ -3848,7 +3848,7 @@ function WeakAuras.PositionOptions(id, data, _, hideWidthHeight, disableSelfPoin
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
width = WeakAuras.normalWidth,
|
width = WeakAuras.normalWidth,
|
||||||
name = L["Set Parent to Anchor"],
|
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,
|
order = 77,
|
||||||
get = function()
|
get = function()
|
||||||
return data.anchorFrameParent or data.anchorFrameParent == nil;
|
return data.anchorFrameParent or data.anchorFrameParent == nil;
|
||||||
@@ -3875,7 +3875,7 @@ function WeakAuras.PositionOptions(id, data, _, hideWidthHeight, disableSelfPoin
|
|||||||
end
|
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)
|
72.1, function() return not(data.anchorFrameType == "CUSTOM" and not IsParentDynamicGroup()) end, {"customAnchor"}, nil, nil, nil, nil, nil, true)
|
||||||
return positionOptions;
|
return positionOptions;
|
||||||
end
|
end
|
||||||
@@ -4134,8 +4134,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
|
|||||||
|
|
||||||
for _, child in ipairs(to_sort) do
|
for _, child in ipairs(to_sort) do
|
||||||
child.frame:Show();
|
child.frame:Show();
|
||||||
if child.AcquireThumnail then
|
if child.AcquireThumbnail then
|
||||||
child:AcquireThumnail()
|
child:AcquireThumbnail()
|
||||||
end
|
end
|
||||||
tinsert(frame.buttonsScroll.children, child);
|
tinsert(frame.buttonsScroll.children, child);
|
||||||
local controlledChildren = children[child:GetTitle()];
|
local controlledChildren = children[child:GetTitle()];
|
||||||
@@ -4144,8 +4144,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
|
|||||||
for _, groupchild in ipairs(controlledChildren) do
|
for _, groupchild in ipairs(controlledChildren) do
|
||||||
if(child:GetExpanded() and visible[groupchild]) then
|
if(child:GetExpanded() and visible[groupchild]) then
|
||||||
displayButtons[groupchild].frame:Show();
|
displayButtons[groupchild].frame:Show();
|
||||||
if displayButtons[groupchild].AcquireThumnail then
|
if displayButtons[groupchild].AcquireThumbnail then
|
||||||
displayButtons[groupchild]:AcquireThumnail()
|
displayButtons[groupchild]:AcquireThumbnail()
|
||||||
end
|
end
|
||||||
tinsert(frame.buttonsScroll.children, displayButtons[groupchild]);
|
tinsert(frame.buttonsScroll.children, displayButtons[groupchild]);
|
||||||
end
|
end
|
||||||
@@ -4199,8 +4199,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
|
|||||||
|
|
||||||
for _, child in ipairs(to_sort) do
|
for _, child in ipairs(to_sort) do
|
||||||
child.frame:Show();
|
child.frame:Show();
|
||||||
if child.AcquireThumnail then
|
if child.AcquireThumbnail then
|
||||||
child:AcquireThumnail()
|
child:AcquireThumbnail()
|
||||||
end
|
end
|
||||||
tinsert(frame.buttonsScroll.children, child);
|
tinsert(frame.buttonsScroll.children, child);
|
||||||
local controlledChildren = children[child:GetTitle()];
|
local controlledChildren = children[child:GetTitle()];
|
||||||
@@ -4209,8 +4209,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
|
|||||||
for _, groupchild in ipairs(controlledChildren) do
|
for _, groupchild in ipairs(controlledChildren) do
|
||||||
if(child:GetExpanded() and visible[groupchild]) then
|
if(child:GetExpanded() and visible[groupchild]) then
|
||||||
displayButtons[groupchild].frame:Show();
|
displayButtons[groupchild].frame:Show();
|
||||||
if displayButtons[groupchild].AcquireThumnail then
|
if displayButtons[groupchild].AcquireThumbnail then
|
||||||
displayButtons[groupchild]:AcquireThumnail()
|
displayButtons[groupchild]:AcquireThumbnail()
|
||||||
end
|
end
|
||||||
tinsert(frame.buttonsScroll.children, displayButtons[groupchild]);
|
tinsert(frame.buttonsScroll.children, displayButtons[groupchild]);
|
||||||
end
|
end
|
||||||
@@ -4224,8 +4224,8 @@ function WeakAuras.SortDisplayButtons(filter, overrideReset, id)
|
|||||||
local groupVisible = not group or visible[group] and displayButtons[group]:GetExpanded()
|
local groupVisible = not group or visible[group] and displayButtons[group]:GetExpanded()
|
||||||
if(not groupVisible or not visible[id]) then
|
if(not groupVisible or not visible[id]) then
|
||||||
child.frame:Hide();
|
child.frame:Hide();
|
||||||
if child.ReleaseThumnail then
|
if child.ReleaseThumbnail then
|
||||||
child:ReleaseThumnail()
|
child:ReleaseThumbnail()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## Interface: 80300
|
## Interface: 30300
|
||||||
## Title: WeakAuras Options
|
## Title: WeakAuras Options
|
||||||
## Author: Mirrored and the WeakAuras Team
|
## Author: Mirrored and the WeakAuras Team
|
||||||
## Version: 2.17.4
|
## Version: 2.17.5
|
||||||
## Notes: Options for WeakAuras
|
## Notes: Options for WeakAuras
|
||||||
## Notes-esES: Opciones para WeakAuras
|
## Notes-esES: Opciones para WeakAuras
|
||||||
## Notes-deDE: Optionen für WeakAuras
|
## Notes-deDE: Optionen für WeakAuras
|
||||||
|
|||||||
Reference in New Issue
Block a user