diff --git a/WeakAuras/Animations.lua b/WeakAuras/Animations.lua index bbf9d71..1a98194 100644 --- a/WeakAuras/Animations.lua +++ b/WeakAuras/Animations.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Animations diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index c43cac9..285fcb3 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/AuraWarnings.lua b/WeakAuras/AuraWarnings.lua index fb5fa85..ec193e0 100644 --- a/WeakAuras/AuraWarnings.lua +++ b/WeakAuras/AuraWarnings.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/BuffTrigger.lua b/WeakAuras/BuffTrigger.lua index 538217f..860f30a 100644 --- a/WeakAuras/BuffTrigger.lua +++ b/WeakAuras/BuffTrigger.lua @@ -2,7 +2,7 @@ This used to contains the "aura" trigger for buffs and debuffs. Nowadays all functions do essentially nothing ]]-- -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index f8633b5..23f18dd 100644 --- a/WeakAuras/BuffTrigger2.lua +++ b/WeakAuras/BuffTrigger2.lua @@ -50,7 +50,7 @@ Returns the tooltip text for additional properties. GetTriggerConditions(data, triggernum) Returns the potential conditions for a trigger ]]-- -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs @@ -230,7 +230,6 @@ local function ReferenceMatchDataMulti(matchData, id, triggernum, destGUID) local matchDataByTriggerBase = GetOrCreateSubTable(matchDataByTrigger, id, triggernum, destGUID) tinsert(matchDataByTriggerBase, matchData) end - matchDataChanged[id] = matchDataChanged[id] or {} matchDataChanged[id][triggernum] = true end @@ -566,6 +565,12 @@ local function UpdateStateWithMatch(time, bestMatch, triggerStates, cloneId, mat changed = true end + if not state.initialTime then + -- Only set initialTime if it wasn't set before + state.initialTime = time + changed = true + end + if state.expirationTime ~= bestMatch.expirationTime then -- A bit fuzzy checking if state.expirationTime and bestMatch.expirationTime and bestMatch.expirationTime - state.expirationTime > 0.2 then @@ -724,6 +729,15 @@ local function UpdateStateWithNoMatch(time, triggerStates, triggerInfo, cloneId, changed = true end + if state.initialTime then + state.initialTime = nil + changed = true + end + if state.refreshTime then + state.refreshTime = nil + changed = true + end + if state.expirationTime ~= math.huge then state.expirationTime = math.huge changed = true @@ -2582,7 +2596,9 @@ function BuffTrigger.GetAdditionalProperties(data, triggernum) ret = ret .. "|cFFFF0000%".. triggernum .. ".debuffClass|r - " .. L["Debuff Class"] .. "\n" ret = ret .. "|cFFFF0000%".. triggernum .. ".unitCaster|r - " .. L["Caster Unit"] .. "\n" ret = ret .. "|cFFFF0000%".. triggernum .. ".casterName|r - " .. L["Caster Name"] .. "\n" - ret = ret .. "|cFFFF0000%".. triggernum .. ".unit|r - " .. L["Unit"] .. "\n" + if trigger.unit ~= "multi" then + ret = ret .. "|cFFFF0000%".. triggernum .. ".unit|r - " .. L["Unit"] .. "\n" + end ret = ret .. "|cFFFF0000%".. triggernum .. ".unitName|r - " .. L["Unit Name"] .. "\n" ret = ret .. "|cFFFF0000%".. triggernum .. ".matchCount|r - " .. L["Match Count"] .. "\n" ret = ret .. "|cFFFF0000%".. triggernum .. ".matchCountPerUnit|r - " .. L["Match Count per Unit"] .. "\n" @@ -3126,18 +3142,12 @@ local function AugmentMatchDataMultiWith(matchData, unit, name, icon, stacks, de changed = true end - if (matchData.unit ~= unit) then - matchData.unit = unit - changed = true - end - local unitName = GetUnitName(unit, false) or "" if matchData.unitName ~= unitName then matchData.unitName = unitName changed = true end - if matchData.spellId ~= spellId then matchData.spellId = name changed = true diff --git a/WeakAuras/Conditions.lua b/WeakAuras/Conditions.lua index fa88394..dea2034 100644 --- a/WeakAuras/Conditions.lua +++ b/WeakAuras/Conditions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L diff --git a/WeakAuras/DebugLog.lua b/WeakAuras/DebugLog.lua index 813d1d7..a90e063 100644 --- a/WeakAuras/DebugLog.lua +++ b/WeakAuras/DebugLog.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 7d69fa0..6768143 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -49,7 +49,7 @@ Returns the a tooltip for the additional properties. GetTriggerConditions(data, triggernum) Returns potential conditions that this trigger provides. ]]-- -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs @@ -1634,9 +1634,9 @@ do update_frame = CreateFrame("Frame"); end if not(updating) then - update_frame:SetScript("OnUpdate", function() + update_frame:SetScript("OnUpdate", function(self, elapsed) if not(WeakAuras.IsPaused()) then - WeakAuras.ScanEvents("FRAME_UPDATE"); + WeakAuras.ScanEvents("FRAME_UPDATE", elapsed); end end); updating = true; diff --git a/WeakAuras/History.lua b/WeakAuras/History.lua index 38566a4..c63e91c 100644 --- a/WeakAuras/History.lua +++ b/WeakAuras/History.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index ea3c50c..5e19b18 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -25,10 +25,6 @@ function WeakAuras.IsClassic() return false end -function WeakAuras.IsCorrectVersion() - return true -end - WeakAuras.prettyPrint = function(...) print("|cff9900ffWeakAuras:|r ", ...) end diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index 07fb46f..80229d7 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L diff --git a/WeakAuras/Profiling.lua b/WeakAuras/Profiling.lua index 1db3605..c924eb7 100644 --- a/WeakAuras/Profiling.lua +++ b/WeakAuras/Profiling.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index bab65b4..f9bfb33 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs @@ -102,6 +102,10 @@ function WeakAuras.TestSchool(spellSchool, test) return spellSchool == test end +function WeakAuras.RaidFlagToIndex(flag) + return Private.combatlog_raidFlags[flag] or 0 +end + Private.function_strings = { count = [[ return function(count) @@ -941,7 +945,7 @@ Private.load_prototype = { display = L["Spell Known"], type = "spell", test = "WeakAuras.IsSpellKnownForLoad(%s, %s)", - events = {"SPELLS_CHANGED"}, + events = {"SPELLS_CHANGED", "UNIT_PET"}, showExactOption = true }, { @@ -949,7 +953,7 @@ Private.load_prototype = { display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Spell Known"], type = "spell", test = "not WeakAuras.IsSpellKnownForLoad(%s, %s)", - events = {"SPELLS_CHANGED"}, + events = {"SPELLS_CHANGED", "UNIT_PET"}, showExactOption = true }, { @@ -1835,7 +1839,7 @@ Private.event_prototypes = { }, { name = "deficit", - display = WeakAuras.newFeatureString .. L["Health Deficit"], + display = L["Health Deficit"], type = "number", init = "total - value", store = true, @@ -1965,7 +1969,7 @@ Private.event_prototypes = { }, { name = "includePets", - display = WeakAuras.newFeatureString .. L["Include Pets"], + display = L["Include Pets"], type = "select", values = "include_pets_types", width = WeakAuras.normalWidth, @@ -2175,7 +2179,7 @@ Private.event_prototypes = { }, { name = "deficit", - display = WeakAuras.newFeatureString .. L["Power Deficit"], + display = L["Power Deficit"], type = "number", init = "total - value", store = true, @@ -2305,7 +2309,7 @@ Private.event_prototypes = { }, { name = "includePets", - display = WeakAuras.newFeatureString .. L["Include Pets"], + display = L["Include Pets"], type = "select", values = "include_pets_types", width = WeakAuras.normalWidth, @@ -2473,6 +2477,35 @@ Private.event_prototypes = { return state and state.show and WeakAuras.CheckCombatLogFlagsObjectType(state.sourceFlags, needle); end }, + { + name = "sourceRaidFlags", + display = L["Source Raid Mark"], + type = "select", + values = "combatlog_raid_mark_check_type", + init = "arg", + store = true, + test = "WeakAuras.CheckRaidFlags(sourceRaidFlags, %q)", + conditionType = "select", + conditionTest = function(state, needle) + return state and state.show and WeakAuras.CheckRaidFlags(state.sourceRaidFlags, needle); + end + }, + { + name = "sourceRaidMarkIndex", + display = WeakAuras.newFeatureString .. L["Source unit's raid mark index"], + init = "WeakAuras.RaidFlagToIndex(sourceRaidFlags)", + test = "true", + store = true, + hidden = true, + }, + { + name = "sourceRaidMark", + display = WeakAuras.newFeatureString .. L["Source unit's raid mark texture"], + test = "true", + init = "sourceRaidMarkIndex > 0 and '{rt'..sourceRaidMarkIndex..'}' or ''", + store = true, + hidden = true, + }, { type = "header", name = "destHeader", @@ -2590,6 +2623,54 @@ Private.event_prototypes = { return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); end, }, + { -- destFlags ignore for SPELL_CAST_START + enable = function(trigger) + return (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); + end, + }, + { + name = "destRaidFlags", + display = L["Dest Raid Mark"], + type = "select", + values = "combatlog_raid_mark_check_type", + init = "arg", + store = true, + test = "WeakAuras.CheckRaidFlags(destRaidFlags, %q)", + conditionType = "select", + conditionTest = function(state, needle) + return state and state.show and WeakAuras.CheckRaidFlags(state.destRaidFlags, needle); + end, + enable = function(trigger) + return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); + end, + }, + { -- destRaidFlags ignore for SPELL_CAST_START + enable = function(trigger) + return (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); + end + }, + { + name = "destRaidMarkIndex", + display = WeakAuras.newFeatureString .. L["Destination unit's raid mark index"], + init = "WeakAuras.RaidFlagToIndex(destRaidFlags)", + test = "true", + store = true, + hidden = true, + enable = function(trigger) + return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); + end, + }, + { + name = "destRaidMark", + display = WeakAuras.newFeatureString .. L["Destination unit's raid mark texture"], + test = "true", + init = "destRaidMarkIndex > 0 and '{rt'..destRaidMarkIndex..'}' or ''", + store = true, + hidden = true, + enable = function(trigger) + return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); + end, + }, {-- destFlags ignore for SPELL_CAST_START enable = function(trigger) return (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); @@ -2669,7 +2750,7 @@ Private.event_prototypes = { }, { name = "spellSchool", - display = WeakAuras.newFeatureString .. L["Spell School"], + display = L["Spell School"], type = "select", values = "combatlog_spell_school_types_for_ui", sorted = true, @@ -5594,7 +5675,7 @@ Private.event_prototypes = { threatpct, rawthreatpct, threatvalue, threattotal = 100, 100, 0, 100 end ]]; - return ret; + return ret .. unitHelperFunctions.SpecificUnitCheck(trigger); end, canHaveDuration = true, statesParameter = "unit", @@ -5688,6 +5769,10 @@ Private.event_prototypes = { { hidden = true, test = "status ~= nil and ok" + }, + { + hidden = true, + test = "WeakAuras.UnitExistsFixed(unit, smart) and specificUnitCheck" } }, automaticrequired = true @@ -6126,7 +6211,7 @@ Private.event_prototypes = { }, { name = "includePets", - display = WeakAuras.newFeatureString .. L["Include Pets"], + display = L["Include Pets"], type = "select", values = "include_pets_types", width = WeakAuras.normalWidth, diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index 1fc87c9..7570f88 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAuras/RegionTypes/DynamicGroup.lua b/WeakAuras/RegionTypes/DynamicGroup.lua index 54ad403..e9877cc 100644 --- a/WeakAuras/RegionTypes/DynamicGroup.lua +++ b/WeakAuras/RegionTypes/DynamicGroup.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras @@ -1096,6 +1096,11 @@ local function modify(parent, region, data) end controlPoint:SetWidth(regionData.dimensions.width) controlPoint:SetHeight(regionData.dimensions.height) + if data.anchorFrameParent then + controlPoint:SetParent(frame == "" and self.relativeTo or frame) + else + controlPoint:SetParent(self) + end if self.anchorPerUnit == "UNITFRAME" then Private.dyngroup_unitframe_monitor[regionData] = frame end diff --git a/WeakAuras/RegionTypes/Group.lua b/WeakAuras/RegionTypes/Group.lua index 1ed9f39..6006e4d 100644 --- a/WeakAuras/RegionTypes/Group.lua +++ b/WeakAuras/RegionTypes/Group.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index ea071cb..dac8480 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L diff --git a/WeakAuras/RegionTypes/Model.lua b/WeakAuras/RegionTypes/Model.lua index 73db987..7a5a4ea 100644 --- a/WeakAuras/RegionTypes/Model.lua +++ b/WeakAuras/RegionTypes/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAuras/RegionTypes/ProgressTexture.lua b/WeakAuras/RegionTypes/ProgressTexture.lua index cf188e4..e7ad55d 100644 --- a/WeakAuras/RegionTypes/ProgressTexture.lua +++ b/WeakAuras/RegionTypes/ProgressTexture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; diff --git a/WeakAuras/RegionTypes/RegionPrototype.lua b/WeakAuras/RegionTypes/RegionPrototype.lua index 443d1c8..8929f52 100644 --- a/WeakAuras/RegionTypes/RegionPrototype.lua +++ b/WeakAuras/RegionTypes/RegionPrototype.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras; @@ -757,8 +757,8 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare region.subRegionEvents:Notify("PreHide") if region:IsProtected() then if InCombatLockdown() then - Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "error", - L["Cannot hide secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], + Private.AuraWarnings.UpdateWarning(uid, "protected_frame_error", "error", + L["Cannot change secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], true) else Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "warning", @@ -788,8 +788,8 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare if region:IsProtected() then if InCombatLockdown() then - Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "error", - L["Cannot hide secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], + Private.AuraWarnings.UpdateWarning(uid, "protected_frame_error", "error", + L["Cannot change secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], true) else Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "warning", @@ -843,8 +843,8 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare Private.ApplyFrameLevel(region) if region:IsProtected() then if InCombatLockdown() then - Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "error", - L["Cannot show secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], + Private.AuraWarnings.UpdateWarning(uid, "protected_frame_error", "error", + L["Cannot change secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], true) else Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "warning", @@ -912,8 +912,8 @@ function WeakAuras.regionPrototype.AddExpandFunction(data, region, cloneId, pare if region:IsProtected() then if InCombatLockdown() then - Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "error", - L["Cannot show secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], + Private.AuraWarnings.UpdateWarning(uid, "protected_frame_error", "error", + L["Cannot change secure frame in combat lockdown. Find more information:\nhttps://github.com/WeakAuras/WeakAuras2/wiki/Protected-Frames"], true) else Private.AuraWarnings.UpdateWarning(uid, "protected_frame", "warning", diff --git a/WeakAuras/RegionTypes/StopMotion.lua b/WeakAuras/RegionTypes/StopMotion.lua index f598a3b..028a818 100644 --- a/WeakAuras/RegionTypes/StopMotion.lua +++ b/WeakAuras/RegionTypes/StopMotion.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local texture_data = WeakAuras.StopMotion.texture_data; diff --git a/WeakAuras/RegionTypes/Text.lua b/WeakAuras/RegionTypes/Text.lua index 33df1e4..baf2b94 100644 --- a/WeakAuras/RegionTypes/Text.lua +++ b/WeakAuras/RegionTypes/Text.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAuras/RegionTypes/Texture.lua b/WeakAuras/RegionTypes/Texture.lua index aa6f1ad..e019666 100644 --- a/WeakAuras/RegionTypes/Texture.lua +++ b/WeakAuras/RegionTypes/Texture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; diff --git a/WeakAuras/SubRegionTypes/Background.lua b/WeakAuras/SubRegionTypes/Background.lua index 97bf3a0..229427f 100644 --- a/WeakAuras/SubRegionTypes/Background.lua +++ b/WeakAuras/SubRegionTypes/Background.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; diff --git a/WeakAuras/SubRegionTypes/Border.lua b/WeakAuras/SubRegionTypes/Border.lua index d1d3984..0a82835 100644 --- a/WeakAuras/SubRegionTypes/Border.lua +++ b/WeakAuras/SubRegionTypes/Border.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAuras/SubRegionTypes/Glow.lua b/WeakAuras/SubRegionTypes/Glow.lua index 4592fa3..a5d8bc0 100644 --- a/WeakAuras/SubRegionTypes/Glow.lua +++ b/WeakAuras/SubRegionTypes/Glow.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local LCG = LibStub("LibCustomGlow-1.0") diff --git a/WeakAuras/SubRegionTypes/Model.lua b/WeakAuras/SubRegionTypes/Model.lua index 211e32b..b8d0bc4 100644 --- a/WeakAuras/SubRegionTypes/Model.lua +++ b/WeakAuras/SubRegionTypes/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; diff --git a/WeakAuras/SubRegionTypes/SubText.lua b/WeakAuras/SubRegionTypes/SubText.lua index 81e55a1..c7842df 100644 --- a/WeakAuras/SubRegionTypes/SubText.lua +++ b/WeakAuras/SubRegionTypes/SubText.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAuras/SubRegionTypes/Tick.lua b/WeakAuras/SubRegionTypes/Tick.lua index c9f567a..9aa6ae8 100644 --- a/WeakAuras/SubRegionTypes/Tick.lua +++ b/WeakAuras/SubRegionTypes/Tick.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; diff --git a/WeakAuras/Transmission.lua b/WeakAuras/Transmission.lua index 3094c18..0981c98 100644 --- a/WeakAuras/Transmission.lua +++ b/WeakAuras/Transmission.lua @@ -18,7 +18,7 @@ Imports an aura from a table, which may or may not be encoded as a B64 string. If target is installed data, or is a uid which points to installed data, then the import will be an update to that aura ]]-- -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 0c76851..2eba5bd 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras; @@ -1168,6 +1168,18 @@ Private.combatlog_raid_mark_check_type = { L["Any"] } +Private.combatlog_raidFlags = { + [0] = 0, + [1] = 1, + [2] = 2, + [4] = 3, + [8] = 4, + [16] = 5, + [32] = 6, + [64] = 7, + [128] = 8, +} + Private.raid_mark_check_type = CopyTable(Private.combatlog_raid_mark_check_type) Private.raid_mark_check_type[9] = nil @@ -2620,6 +2632,7 @@ Private.author_option_fields = { hideReorder = true, entryNames = nil, -- handled as a special case in code subOptions = {}, + noMerge = false, } } @@ -2753,11 +2766,13 @@ Private.reset_swing_spells = { [GetSpellInfo(6807)] = true, -- Maul [GetSpellInfo(20549)] = true, -- War Stomp [GetSpellInfo(56815)] = true, -- Rune Strike + [GetSpellInfo(5384)] = true, -- Feign Death } Private.reset_ranged_swing_spells = { [GetSpellInfo(2764)] = true, -- Throw [GetSpellInfo(5019)] = true, -- Shoot Wands [GetSpellInfo(75)] = true, -- Auto Shot + [GetSpellInfo(5384)] = true, -- Feign Death } WeakAuras.StopMotion = {} diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index c778430..a592435 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -107,10 +107,6 @@ end SLASH_WEAKAURAS1, SLASH_WEAKAURAS2 = "/weakauras", "/wa"; function SlashCmdList.WEAKAURAS(input) - if not WeakAuras.IsCorrectVersion() then - prettyPrint(Private.wrongTargetMessage) - return - end local args, msg = {}, nil @@ -141,7 +137,7 @@ function SlashCmdList.WEAKAURAS(input) end end -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end function Private.ToggleMinimap() WeakAurasSaved.minimap.hide = not WeakAurasSaved.minimap.hide @@ -2311,8 +2307,6 @@ local function removeNameplateUnits(data) if trigger and trigger.type == "unit" then if trigger.unit == "nameplate" then trigger.unit = "target" - elseif trigger.threatUnit == "nameplate" then - trigger.threatUnit = "target" end end end @@ -3020,12 +3014,15 @@ do if new_frame and new_frame ~= data.frame then local id = region.id .. (region.cloneId or "") -- remove previous glow - actionGlowStop(data.actions, data.frame, id) + if data.frame then + actionGlowStop(data.actions, data.frame, id) + end -- apply the glow to new_frame data.frame = new_frame actionGlowStart(data.actions, data.frame, id) -- update hidefunc local region = region + region.active_glows_hidefunc = region.active_glows_hidefunc or {} region.active_glows_hidefunc[data.frame] = function() actionGlowStop(data.actions, data.frame, id) glow_frame_monitor[region] = nil @@ -3081,7 +3078,7 @@ function Private.HandleGlowAction(actions, region) or (actions.glow_frame_type == "FRAMESELECTOR" and actions.glow_frame) ) then - local glow_frame + local glow_frame, should_glow_frame if actions.glow_frame_type == "FRAMESELECTOR" then if actions.glow_frame:sub(1, 10) == "WeakAuras:" then local frame_name = actions.glow_frame:sub(11) @@ -3090,45 +3087,55 @@ function Private.HandleGlowAction(actions, region) end if WeakAuras.regions[frame_name] then glow_frame = WeakAuras.regions[frame_name].region + should_glow_frame = true end else glow_frame = Private.GetSanitizedGlobal(actions.glow_frame) + should_glow_frame = true end elseif actions.glow_frame_type == "UNITFRAME" and region.state.unit then glow_frame = WeakAuras.GetUnitFrame(region.state.unit) + should_glow_frame = true elseif actions.glow_frame_type == "NAMEPLATE" and region.state.unit then - glow_frame = WeakAuras.isAwesomeEnabled() and WeakAuras.GetNamePlateForUnit(region.state.unit) or nil + if not(WeakAuras.isAwesomeEnabled()) then return end + glow_frame = WeakAuras.GetNamePlateForUnit(region.state.unit) + should_glow_frame = true end - if glow_frame then + if should_glow_frame then local id = region.id .. (region.cloneId or "") if actions.glow_action == "show" then -- remove previous glow - if region.active_glows_hidefunc - and region.active_glows_hidefunc[glow_frame] - then - region.active_glows_hidefunc[glow_frame]() + if glow_frame then + if region.active_glows_hidefunc + and region.active_glows_hidefunc[glow_frame] + then + region.active_glows_hidefunc[glow_frame]() + end + -- start glow + actionGlowStart(actions, glow_frame, id) + -- make unglow function & monitor unitframe changes + region.active_glows_hidefunc = region.active_glows_hidefunc or {} + if actions.glow_frame_type == "UNITFRAME" then + region.active_glows_hidefunc[glow_frame] = function() + actionGlowStop(actions, glow_frame, id) + glow_frame_monitor[region] = nil + end + else + region.active_glows_hidefunc[glow_frame] = function() + actionGlowStop(actions, glow_frame, id) + end + end end - -- start glow - actionGlowStart(actions, glow_frame, id) - -- make unglow function & monitor unitframe changes - region.active_glows_hidefunc = region.active_glows_hidefunc or {} if actions.glow_frame_type == "UNITFRAME" then glow_frame_monitor = glow_frame_monitor or {} glow_frame_monitor[region] = { actions = actions, frame = glow_frame } - region.active_glows_hidefunc[glow_frame] = function() - actionGlowStop(actions, glow_frame, id) - glow_frame_monitor[region] = nil - end - else - region.active_glows_hidefunc[glow_frame] = function() - actionGlowStop(actions, glow_frame, id) - end end elseif actions.glow_action == "hide" + and glow_frame and region.active_glows_hidefunc and region.active_glows_hidefunc[glow_frame] then diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasInlineGroup.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasInlineGroup.lua index 4dce5a5..fe78a51 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasInlineGroup.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasInlineGroup.lua @@ -3,7 +3,9 @@ WeakAurasInlineGroup based on InlineGroup Container Simple container widget that has the same API as a InlineGroup, without actually showing any borders or a title. -------------------------------------------------------------------------------]] -local Type, Version = "WeakAurasInlineGroup", 1 +if not WeakAuras.IsLibsOK() then return end + +local Type, Version = "WeakAurasInlineGroup", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua index 1fb5ff2..bb9ff11 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua @@ -3,9 +3,9 @@ WeakAurasTreeGroup Container Container that uses a tree control to switch between groups. This file was forked from AceGUIContainer-TreeGroup.lua version 41 -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasTreeGroup", 2 +local Type, Version = "WeakAurasTreeGroup", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua index 773881a..743faaa 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasAnchorButtons", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua index 72ba348..4f455cc 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local tinsert, tremove, wipe = table.insert, table.remove, wipe diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua index 3fee718..7fa0556 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua @@ -1,9 +1,9 @@ --[[----------------------------------------------------------------------------- Button Widget for our Expand button -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasExpand", 3 +local Type, Version = "WeakAurasExpand", 4 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua index a4bb427..2ff8593 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua @@ -1,9 +1,9 @@ --[[----------------------------------------------------------------------------- Anchor for a Expandable section -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -local Type, Version = "WeakAurasExpandAnchor", 2 +local Type, Version = "WeakAurasExpandAnchor", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua index 1e7dd7f..ced766b 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua @@ -1,10 +1,10 @@ --[[----------------------------------------------------------------------------- Button Widget for our Expand button -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -local Type, Version = "WeakAurasExpandSmall", 2 +local Type, Version = "WeakAurasExpandSmall", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua index bd164aa..99f4db4 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua @@ -3,9 +3,9 @@ Icon Widget that allows for a tooltip, by preventing SetLabel from actually setting a label Graphical Button. -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasIcon", 1 +local Type, Version = "WeakAurasIcon", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua index 13a0724..917a3c1 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasIconButton", 21 +local Type, Version = "WeakAurasIconButton", 22 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua index c372f97..8d0ce8d 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasImportButton", 20 +local Type, Version = "WeakAurasImportButton", 21 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua index 478c58e..411aef0 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Input Widget that allows to show an alternative text when it does not have focus -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasInputFocus", 1 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasLoadedHeaderButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasLoadedHeaderButton.lua index 3e0fadd..af1420c 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasLoadedHeaderButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasLoadedHeaderButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasLoadedHeaderButton", 22 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua index 2a6a67b..73b68df 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasMultiLineEditBox", 35 +local Type, Version = "WeakAurasMultiLineEditBox", 36 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua index 3fd968c..3e19416 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -- based on the AceGUI widget, overwrites the enter handling local Type, Version = "WeakAuras-MultiLineEditBoxWithEnter", 1 diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewButton.lua index 32099fb..3bc471e 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewButton.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasNewButton", 24 +local Type, Version = "WeakAurasNewButton", 25 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua index 6d489e5..543a824 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasNewHeaderButton", 20 +local Type, Version = "WeakAurasNewHeaderButton", 21 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua index efc06b5..5fa6423 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua @@ -1,12 +1,10 @@ -if not WeakAuras.IsCorrectVersion() then - return -end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local pairs, next, type, unpack = pairs, next, type, unpack -local Type, Version = "WeakAurasPendingInstallButton", 2 +local Type, Version = "WeakAurasPendingInstallButton", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua index e2e4ff5..ea4d608 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua @@ -1,13 +1,11 @@ -if not WeakAuras.IsCorrectVersion() then - return -end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L local pairs, next, type, unpack = pairs, next, type, unpack -local Type, Version = "WeakAurasPendingUpdateButton", 2 +local Type, Version = "WeakAurasPendingUpdateButton", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua index 21354e3..e884910 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua @@ -2,7 +2,9 @@ SnippetButton Widget, based on AceGUI Button (and WA ToolbarButton) Graphical Button. -------------------------------------------------------------------------------]] -local Type, Version = "WeakAurasSnippetButton", 1 +if not WeakAuras.IsLibsOK() then return end + +local Type, Version = "WeakAurasSnippetButton", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpacer.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpacer.lua index f05d179..031522c 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpacer.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpacer.lua @@ -2,7 +2,9 @@ Spacer Widget Just uses up a bit of horizontal space -------------------------------------------------------------------------------]] -local Type, Version = "WeakAurasSpacer", 1 +if not WeakAuras.IsLibsOK() then return end + +local Type, Version = "WeakAurasSpacer", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua index 7864a06..92e119a 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua @@ -1,6 +1,8 @@ --[[----------------------------------------------------------------------------- Spin Box Widget -------------------------------------------------------------------------------]] +if not WeakAuras.IsLibsOK() then return end + local Type, Version = "WeakAurasSpinBox", 5 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua index b321578..6d58a2a 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasTextureButton", 25 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasToolbarButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasToolbarButton.lua index 745ccc2..11c8c55 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasToolbarButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasToolbarButton.lua @@ -2,6 +2,8 @@ ToolbarButton Widget, based on AceGUI Button Graphical Button. -------------------------------------------------------------------------------]] +if not WeakAuras.IsLibsOK() then return end + local Type, Version = "WeakAurasToolbarButton", 6 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua index 5a99a04..869a22b 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -local Type, Version = "WeakAurasTwoColumnDropdown", 3 +local Type, Version = "WeakAurasTwoColumnDropdown", 4 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGuiWidget-WeakAurasProgressBar.lua b/WeakAurasOptions/AceGUI-Widgets/AceGuiWidget-WeakAurasProgressBar.lua index 809e95c..65d281b 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGuiWidget-WeakAurasProgressBar.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGuiWidget-WeakAurasProgressBar.lua @@ -2,7 +2,9 @@ Progress Bar Widget A simple progress bar -------------------------------------------------------------------------------]] -local Type, Version = "WeakAurasProgressBar", 1 +if not WeakAuras.IsLibsOK() then return end + +local Type, Version = "WeakAurasProgressBar", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end diff --git a/WeakAurasOptions/ActionOptions.lua b/WeakAurasOptions/ActionOptions.lua index 8779964..4019d72 100644 --- a/WeakAurasOptions/ActionOptions.lua +++ b/WeakAurasOptions/ActionOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/AnimationOptions.lua b/WeakAurasOptions/AnimationOptions.lua index 5d4796c..e237efe 100644 --- a/WeakAurasOptions/AnimationOptions.lua +++ b/WeakAurasOptions/AnimationOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/AuthorOptions.lua b/WeakAurasOptions/AuthorOptions.lua index fb86688..42c4018 100644 --- a/WeakAurasOptions/AuthorOptions.lua +++ b/WeakAurasOptions/AuthorOptions.lua @@ -58,7 +58,7 @@ bigStep (optional) -> step size of the slider. Defaults to 0.05 step (optional) -> like bigStep, but applies to number input as well ]] -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local WeakAuras = WeakAuras @@ -1180,6 +1180,15 @@ typeControlAdders = { end, disabled = function() return not option.useCollapse end } + args[prefix .. "noMerge"] = { + type = "toggle", + name = WeakAuras.newFeatureString .. name(option, "noMerge", L["Prevent Merging"]), + desc = desc(option, "noMerge", L["If checked, then this group will not merge with other group when selecting multiple auras."]), + order = order(), + width = WeakAuras.doubleWidth, + get = get(option, "noMerge"), + set = set(data, option, "noMerge"), + } if option.groupType ~="simple" then args[prefix .. "limitType"] = { type = "select", @@ -1998,7 +2007,7 @@ local function addUserModeOption(options, args, data, order, prefix, i) while i <= #values or i <= #childValues do if firstChild then values[i] = childValues[i][nameSource] or conflictBlue .. L["Entry %i"]:format(i) - elseif childValues[i][nameSource] ~= values[i] then + elseif not childValues[i] or childValues[i][nameSource] ~= values[i] then values[i] = conflictBlue .. L["Entry %i"]:format(i) end i = i + 1 @@ -2106,6 +2115,7 @@ local function addUserModeOption(options, args, data, order, prefix, i) type = "execute", name = L["Delete Entry"], order = order(), + confirm = true, func = function() for id, optionData in pairs(option.references) do local childOption = optionData.options[optionData.index] diff --git a/WeakAurasOptions/BuffTrigger.lua b/WeakAurasOptions/BuffTrigger.lua index 521d829..e9f0013 100644 --- a/WeakAurasOptions/BuffTrigger.lua +++ b/WeakAurasOptions/BuffTrigger.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/BuffTrigger2.lua b/WeakAurasOptions/BuffTrigger2.lua index 41a8917..949f677 100644 --- a/WeakAurasOptions/BuffTrigger2.lua +++ b/WeakAurasOptions/BuffTrigger2.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L @@ -687,7 +687,7 @@ local function GetBuffTriggerOptions(data, triggernum) use_includePets = { type = "toggle", width = WeakAuras.normalWidth, - name = WeakAuras.newFeatureString .. L["Include Pets"], + name = L["Include Pets"], order = 66.1, hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party")) @@ -697,7 +697,7 @@ local function GetBuffTriggerOptions(data, triggernum) type = "select", values = OptionsPrivate.Private.include_pets_types, width = WeakAuras.normalWidth, - name = WeakAuras.newFeatureString .. L["Include Pets"], + name = L["Include Pets"], order = 66.15, hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party") and trigger.use_includePets) end, }, diff --git a/WeakAurasOptions/Cache.lua b/WeakAurasOptions/Cache.lua index fbe94da..b036ff9 100644 --- a/WeakAurasOptions/Cache.lua +++ b/WeakAurasOptions/Cache.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index bdd05cb..2c9b6ed 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L @@ -1072,7 +1072,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g return data.anchorFrameParent or data.anchorFrameParent == nil; end, hidden = function() - return (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" or IsParentDynamicGroup()); + return not IsGroupByFrame() and (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" or IsParentDynamicGroup()); end, }, anchorFrameSpaceOne = { @@ -1082,7 +1082,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g order = 72, image = function() return "", 0, 0 end, hidden = function() - return IsParentDynamicGroup() or IsGroupByFrame() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE") + return IsParentDynamicGroup() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE") end, }, -- Input field to select frame to anchor on @@ -1142,6 +1142,9 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g if IsGroupByFrame() then return false end + if IsParentDynamicGroup() then + return true + end return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE"; else return data.anchorFrameType == "MOUSE"; diff --git a/WeakAurasOptions/ConditionOptions.lua b/WeakAurasOptions/ConditionOptions.lua index 5b15861..44be1bf 100644 --- a/WeakAurasOptions/ConditionOptions.lua +++ b/WeakAurasOptions/ConditionOptions.lua @@ -44,7 +44,7 @@ -- - setter: The setter function, called both on activating and deactivating a property change --- - action: The action function, called on activating a condition -- - type: The type -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local WeakAuras = WeakAuras; diff --git a/WeakAurasOptions/DisplayOptions.lua b/WeakAurasOptions/DisplayOptions.lua index 19e0149..f9d53c1 100644 --- a/WeakAurasOptions/DisplayOptions.lua +++ b/WeakAurasOptions/DisplayOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L local regionOptions = WeakAuras.regionOptions diff --git a/WeakAurasOptions/ForAllIndentsAndPurposes.lua b/WeakAurasOptions/ForAllIndentsAndPurposes.lua index 0e6bc72..10d90ab 100644 --- a/WeakAurasOptions/ForAllIndentsAndPurposes.lua +++ b/WeakAurasOptions/ForAllIndentsAndPurposes.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end -- For All Indents And Purposes local revision = 23 diff --git a/WeakAurasOptions/GenericTrigger.lua b/WeakAurasOptions/GenericTrigger.lua index 5dbbd0c..883f924 100644 --- a/WeakAurasOptions/GenericTrigger.lua +++ b/WeakAurasOptions/GenericTrigger.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/GroupOptions.lua b/WeakAurasOptions/GroupOptions.lua index d45c55c..817be4f 100644 --- a/WeakAurasOptions/GroupOptions.lua +++ b/WeakAurasOptions/GroupOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/InformationOptions.lua b/WeakAurasOptions/InformationOptions.lua index e8a7e6b..73ed612 100644 --- a/WeakAurasOptions/InformationOptions.lua +++ b/WeakAurasOptions/InformationOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/LoadOptions.lua b/WeakAurasOptions/LoadOptions.lua index 3d52dec..e27e3eb 100644 --- a/WeakAurasOptions/LoadOptions.lua +++ b/WeakAurasOptions/LoadOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/Locales/deDE.lua b/WeakAurasOptions/Locales/deDE.lua index 708bffb..3deca55 100644 --- a/WeakAurasOptions/Locales/deDE.lua +++ b/WeakAurasOptions/Locales/deDE.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "deDE" then return diff --git a/WeakAurasOptions/Locales/enUS.lua b/WeakAurasOptions/Locales/enUS.lua index 8d00390..b3710df 100644 --- a/WeakAurasOptions/Locales/enUS.lua +++ b/WeakAurasOptions/Locales/enUS.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local L = WeakAuras.L diff --git a/WeakAurasOptions/Locales/esES.lua b/WeakAurasOptions/Locales/esES.lua index d468fd7..1fb0d3c 100644 --- a/WeakAurasOptions/Locales/esES.lua +++ b/WeakAurasOptions/Locales/esES.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "esES" then return diff --git a/WeakAurasOptions/Locales/esMX.lua b/WeakAurasOptions/Locales/esMX.lua index 805889c..f67284b 100644 --- a/WeakAurasOptions/Locales/esMX.lua +++ b/WeakAurasOptions/Locales/esMX.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "esMX" then return diff --git a/WeakAurasOptions/Locales/frFR.lua b/WeakAurasOptions/Locales/frFR.lua index d5abaae..75006b6 100644 --- a/WeakAurasOptions/Locales/frFR.lua +++ b/WeakAurasOptions/Locales/frFR.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "frFR" then return diff --git a/WeakAurasOptions/Locales/itIT.lua b/WeakAurasOptions/Locales/itIT.lua index 8ed5bcb..3a3799c 100644 --- a/WeakAurasOptions/Locales/itIT.lua +++ b/WeakAurasOptions/Locales/itIT.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "itIT" then return diff --git a/WeakAurasOptions/Locales/koKR.lua b/WeakAurasOptions/Locales/koKR.lua index ab55e56..937891f 100644 --- a/WeakAurasOptions/Locales/koKR.lua +++ b/WeakAurasOptions/Locales/koKR.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "koKR" then return diff --git a/WeakAurasOptions/Locales/ptBR.lua b/WeakAurasOptions/Locales/ptBR.lua index 1221ac9..86fa1fe 100644 --- a/WeakAurasOptions/Locales/ptBR.lua +++ b/WeakAurasOptions/Locales/ptBR.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "ptBR" then return diff --git a/WeakAurasOptions/Locales/ruRU.lua b/WeakAurasOptions/Locales/ruRU.lua index 14dc68f..6ff248c 100644 --- a/WeakAurasOptions/Locales/ruRU.lua +++ b/WeakAurasOptions/Locales/ruRU.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "ruRU" then return diff --git a/WeakAurasOptions/Locales/zhCN.lua b/WeakAurasOptions/Locales/zhCN.lua index f1ba902..451a066 100644 --- a/WeakAurasOptions/Locales/zhCN.lua +++ b/WeakAurasOptions/Locales/zhCN.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "zhCN" then return diff --git a/WeakAurasOptions/Locales/zhTW.lua b/WeakAurasOptions/Locales/zhTW.lua index 01eaedb..1fef272 100644 --- a/WeakAurasOptions/Locales/zhTW.lua +++ b/WeakAurasOptions/Locales/zhTW.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end if GetLocale() ~= "zhTW" then return diff --git a/WeakAurasOptions/OptionsFrames/CodeReview.lua b/WeakAurasOptions/OptionsFrames/CodeReview.lua index 2f67f7e..697ed10 100644 --- a/WeakAurasOptions/OptionsFrames/CodeReview.lua +++ b/WeakAurasOptions/OptionsFrames/CodeReview.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/DebugLogFrame.lua b/WeakAurasOptions/OptionsFrames/DebugLogFrame.lua index 836f057..7ea2bdd 100644 --- a/WeakAurasOptions/OptionsFrames/DebugLogFrame.lua +++ b/WeakAurasOptions/OptionsFrames/DebugLogFrame.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- WoW APIs diff --git a/WeakAurasOptions/OptionsFrames/FrameChooser.lua b/WeakAurasOptions/OptionsFrames/FrameChooser.lua index ec95374..ea83896 100644 --- a/WeakAurasOptions/OptionsFrames/FrameChooser.lua +++ b/WeakAurasOptions/OptionsFrames/FrameChooser.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/IconPicker.lua b/WeakAurasOptions/OptionsFrames/IconPicker.lua index 607d7b1..ca243f3 100644 --- a/WeakAurasOptions/OptionsFrames/IconPicker.lua +++ b/WeakAurasOptions/OptionsFrames/IconPicker.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/ImportExport.lua b/WeakAurasOptions/OptionsFrames/ImportExport.lua index 99aa86e..ecc4075 100644 --- a/WeakAurasOptions/OptionsFrames/ImportExport.lua +++ b/WeakAurasOptions/OptionsFrames/ImportExport.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- WoW APIs diff --git a/WeakAurasOptions/OptionsFrames/ModelPicker.lua b/WeakAurasOptions/OptionsFrames/ModelPicker.lua index 0083ca7..43eeaec 100644 --- a/WeakAurasOptions/OptionsFrames/ModelPicker.lua +++ b/WeakAurasOptions/OptionsFrames/ModelPicker.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/MoverSizer.lua b/WeakAurasOptions/OptionsFrames/MoverSizer.lua index 98a54fd..031b766 100644 --- a/WeakAurasOptions/OptionsFrames/MoverSizer.lua +++ b/WeakAurasOptions/OptionsFrames/MoverSizer.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/OptionsFrame.lua b/WeakAurasOptions/OptionsFrames/OptionsFrame.lua index f614d20..e76c8fc 100644 --- a/WeakAurasOptions/OptionsFrames/OptionsFrame.lua +++ b/WeakAurasOptions/OptionsFrames/OptionsFrame.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -1159,9 +1159,9 @@ function OptionsPrivate.CreateFrame() containerScroll:AddChild(simpleLabel) local button = AceGUI:Create("WeakAurasNewButton") - button:SetTitle(L["From Template"]) + button:SetTitle(L["Premade Auras"]) button:SetDescription(L["Offer a guided way to create auras for your character"]) - button:SetIcon("Interface\\Icons\\INV_Misc_Book_06") + button:SetIcon("Interface\\Icons\\Inv_misc_book_09") button:SetClick(function() OptionsPrivate.OpenTriggerTemplate(nil, self:GetTargetAura()) end) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 41aa503..cf84a36 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -55,6 +55,7 @@ local editor_themes = { } if not WeakAurasSaved.editor_tab_spaces then WeakAurasSaved.editor_tab_spaces = 4 end +if not WeakAurasSaved.editor_font_size then WeakAurasSaved.editor_font_size = 12 end -- set default font size if missing local color_scheme = {[0] = "|r"} local function set_scheme() if not WeakAurasSaved.editor_theme then @@ -162,7 +163,7 @@ local function ConstructTextEditor(frame) editor:DisableButton(true) local fontPath = SharedMedia:Fetch("font", "Fira Mono Medium") if (fontPath) then - editor.editBox:SetFont(fontPath, 12) + editor.editBox:SetFont(fontPath, WeakAurasSaved.editor_font_size) end group:AddChild(editor) @@ -263,6 +264,14 @@ local function ConstructTextEditor(frame) menuList = "spaces" }, level) + UIDropDownMenu_AddButton( + { + text = WeakAuras.newFeatureString .. L["Font Size"], + hasArrow = true, + notCheckable = true, + menuList = "sizes" + }, + level) elseif menu == "spaces" then local spaces = {2,4} for _, i in pairs(spaces) do @@ -282,6 +291,23 @@ local function ConstructTextEditor(frame) }, level) end + elseif menu == "sizes" then + local sizes = {10, 12, 14, 16} + for _, i in pairs(sizes) do + UIDropDownMenu_AddButton( + { + text = i, + isNotRadio = false, + checked = function() + return WeakAurasSaved.editor_font_size == i + end, + func = function() + WeakAurasSaved.editor_font_size = i + editor.editBox:SetFont(fontPath, WeakAurasSaved.editor_font_size) + end + }, + level) + end end end UIDropDownMenu_Initialize(dropdown, settings_dropdown_initialize, "MENU") @@ -475,16 +501,13 @@ local function ConstructTextEditor(frame) end ) - -- CTRL + S saves and closes, ESC cancels and closes + -- CTRL + S saves and closes editor.editBox:HookScript( "OnKeyDown", function(_, key) if IsControlKeyDown() and key == "S" then group:Close() end - if key == "ESCAPE" then - group:CancelClose() - end end ) diff --git a/WeakAurasOptions/OptionsFrames/TexturePicker.lua b/WeakAurasOptions/OptionsFrames/TexturePicker.lua index ba5452b..8860ae5 100644 --- a/WeakAurasOptions/OptionsFrames/TexturePicker.lua +++ b/WeakAurasOptions/OptionsFrames/TexturePicker.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/Update.lua b/WeakAurasOptions/OptionsFrames/Update.lua index f36a709..30090d1 100644 --- a/WeakAurasOptions/OptionsFrames/Update.lua +++ b/WeakAurasOptions/OptionsFrames/Update.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local AceGUI = LibStub("AceGUI-3.0") diff --git a/WeakAurasOptions/RegionOptions/AuraBar.lua b/WeakAurasOptions/RegionOptions/AuraBar.lua index a3dc351..47c0517 100644 --- a/WeakAurasOptions/RegionOptions/AuraBar.lua +++ b/WeakAurasOptions/RegionOptions/AuraBar.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAurasOptions/RegionOptions/DynamicGroup.lua b/WeakAurasOptions/RegionOptions/DynamicGroup.lua index 9621fa8..b4d0b3f 100644 --- a/WeakAurasOptions/RegionOptions/DynamicGroup.lua +++ b/WeakAurasOptions/RegionOptions/DynamicGroup.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/RegionOptions/Group.lua b/WeakAurasOptions/RegionOptions/Group.lua index cc73a21..641371a 100644 --- a/WeakAurasOptions/RegionOptions/Group.lua +++ b/WeakAurasOptions/RegionOptions/Group.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; @@ -413,7 +413,7 @@ local function createDistributeAlignOptions(id, data) local childData = WeakAuras.GetData(childId); local childRegion = WeakAuras.GetRegion(childId) if(childData and childRegion) then - if(v > 0) then + if(v >= 0) then if(childData.selfPoint:find("LEFT")) then childData.xOffset = xOffset; elseif(childData.selfPoint:find("RIGHT")) then @@ -497,7 +497,7 @@ local function createDistributeAlignOptions(id, data) local childData = WeakAuras.GetData(childId); local childRegion = WeakAuras.GetRegion(childId) if(childData and childRegion) then - if(v > 0) then + if(v >= 0) then if(childData.selfPoint:find("BOTTOM")) then childData.yOffset = yOffset; elseif(childData.selfPoint:find("TOP")) then diff --git a/WeakAurasOptions/RegionOptions/Icon.lua b/WeakAurasOptions/RegionOptions/Icon.lua index b278530..538cd95 100644 --- a/WeakAurasOptions/RegionOptions/Icon.lua +++ b/WeakAurasOptions/RegionOptions/Icon.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local Masque = LibStub("Masque", true) diff --git a/WeakAurasOptions/RegionOptions/Model.lua b/WeakAurasOptions/RegionOptions/Model.lua index 2e210b1..d17d866 100644 --- a/WeakAurasOptions/RegionOptions/Model.lua +++ b/WeakAurasOptions/RegionOptions/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/RegionOptions/ProgressTexture.lua b/WeakAurasOptions/RegionOptions/ProgressTexture.lua index 25fe782..01a0625 100644 --- a/WeakAurasOptions/RegionOptions/ProgressTexture.lua +++ b/WeakAurasOptions/RegionOptions/ProgressTexture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/RegionOptions/StopMotion.lua b/WeakAurasOptions/RegionOptions/StopMotion.lua index 8f0b5d8..b31374c 100644 --- a/WeakAurasOptions/RegionOptions/StopMotion.lua +++ b/WeakAurasOptions/RegionOptions/StopMotion.lua @@ -1,3 +1,5 @@ +if not WeakAuras.IsLibsOK() then return end + local L = WeakAuras.L local AddonName, OptionsPrivate = ... diff --git a/WeakAurasOptions/RegionOptions/Text.lua b/WeakAurasOptions/RegionOptions/Text.lua index faf0311..25cd9f7 100644 --- a/WeakAurasOptions/RegionOptions/Text.lua +++ b/WeakAurasOptions/RegionOptions/Text.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAurasOptions/RegionOptions/Texture.lua b/WeakAurasOptions/RegionOptions/Texture.lua index e84616b..e07ce47 100644 --- a/WeakAurasOptions/RegionOptions/Texture.lua +++ b/WeakAurasOptions/RegionOptions/Texture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/SubRegionOptions/Background.lua b/WeakAurasOptions/SubRegionOptions/Background.lua index ec8ea5f..8ed24ca 100644 --- a/WeakAurasOptions/SubRegionOptions/Background.lua +++ b/WeakAurasOptions/SubRegionOptions/Background.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/SubRegionOptions/Border.lua b/WeakAurasOptions/SubRegionOptions/Border.lua index 830d441..fd12637 100644 --- a/WeakAurasOptions/SubRegionOptions/Border.lua +++ b/WeakAurasOptions/SubRegionOptions/Border.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/SubRegionOptions/Glow.lua b/WeakAurasOptions/SubRegionOptions/Glow.lua index ce9bc01..1eff8fc 100644 --- a/WeakAurasOptions/SubRegionOptions/Glow.lua +++ b/WeakAurasOptions/SubRegionOptions/Glow.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/SubRegionOptions/Model.lua b/WeakAurasOptions/SubRegionOptions/Model.lua index 19a4a67..7384163 100644 --- a/WeakAurasOptions/SubRegionOptions/Model.lua +++ b/WeakAurasOptions/SubRegionOptions/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua b/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua index 24fb49b..8197233 100644 --- a/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua +++ b/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Magic constant diff --git a/WeakAurasOptions/SubRegionOptions/SubText.lua b/WeakAurasOptions/SubRegionOptions/SubText.lua index e492dc7..765250d 100644 --- a/WeakAurasOptions/SubRegionOptions/SubText.lua +++ b/WeakAurasOptions/SubRegionOptions/SubText.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/SubRegionOptions/Tick.lua b/WeakAurasOptions/SubRegionOptions/Tick.lua index e6591f6..fd88de7 100644 --- a/WeakAurasOptions/SubRegionOptions/Tick.lua +++ b/WeakAurasOptions/SubRegionOptions/Tick.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/TriggerOptions.lua b/WeakAurasOptions/TriggerOptions.lua index 5dfca41..6236ba5 100644 --- a/WeakAurasOptions/TriggerOptions.lua +++ b/WeakAurasOptions/TriggerOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua index eb401a4..15bf849 100644 --- a/WeakAurasOptions/WeakAurasOptions.lua +++ b/WeakAurasOptions/WeakAurasOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end +if not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs