From 8375cfa0a79f53cdcb3c9767260e1d1e48522143 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Sun, 5 Jan 2025 15:08:50 +0100 Subject: [PATCH] from retail --- WeakAuras/Animations.lua | 2 +- WeakAuras/AuraEnvironment.lua | 2 +- WeakAuras/AuraWarnings.lua | 2 +- WeakAuras/BuffTrigger.lua | 2 +- WeakAuras/BuffTrigger2.lua | 4 +- WeakAuras/Conditions.lua | 8 +-- WeakAuras/GenericTrigger.lua | 20 +++---- WeakAuras/History.lua | 2 +- WeakAuras/Init.lua | 57 ++++++++++++++++++- .../widgets/AceGUIWidget-DropDown.lua | 2 +- WeakAuras/Locales/deDE.lua | 2 +- WeakAuras/Locales/esES.lua | 2 +- WeakAuras/Locales/esMX.lua | 2 +- WeakAuras/Locales/frFR.lua | 2 +- WeakAuras/Locales/itIT.lua | 2 +- WeakAuras/Locales/koKR.lua | 2 +- WeakAuras/Locales/ptBR.lua | 2 +- WeakAuras/Locales/ruRU.lua | 2 +- WeakAuras/Locales/zhCN.lua | 2 +- WeakAuras/Locales/zhTW.lua | 2 +- WeakAuras/Modernize.lua | 13 ++++- WeakAuras/Profiling.lua | 20 ++++--- WeakAuras/Prototypes.lua | 41 +++++++------ WeakAuras/RegionTypes/AuraBar.lua | 12 ++-- WeakAuras/RegionTypes/DynamicGroup.lua | 8 +-- WeakAuras/RegionTypes/Group.lua | 6 +- WeakAuras/RegionTypes/Icon.lua | 12 ++-- WeakAuras/RegionTypes/Model.lua | 6 +- WeakAuras/RegionTypes/ProgressTexture.lua | 4 +- WeakAuras/RegionTypes/RegionPrototype.lua | 4 +- WeakAuras/RegionTypes/StopMotion.lua | 4 +- WeakAuras/RegionTypes/Text.lua | 6 +- WeakAuras/RegionTypes/Texture.lua | 4 +- WeakAuras/SubRegionTypes/Background.lua | 2 +- WeakAuras/SubRegionTypes/Border.lua | 4 +- WeakAuras/SubRegionTypes/Glow.lua | 4 +- WeakAuras/SubRegionTypes/Model.lua | 4 +- WeakAuras/SubRegionTypes/SubText.lua | 4 +- WeakAuras/SubRegionTypes/Tick.lua | 4 +- WeakAuras/Transmission.lua | 2 +- WeakAuras/Types.lua | 10 ++-- WeakAuras/WeakAuras.lua | 24 ++++---- .../AceGUIContainer-WeakAurasTreeGroup.lua | 2 +- .../AceGUIWidget-WeakAurasAnchorButtons.lua | 2 +- .../AceGUIWidget-WeakAurasDisplayButton.lua | 12 ++-- .../AceGUIWidget-WeakAurasExpand.lua | 2 +- .../AceGUIWidget-WeakAurasExpandAnchor.lua | 2 +- .../AceGUIWidget-WeakAurasExpandSmall.lua | 2 +- .../AceGUIWidget-WeakAurasIcon.lua | 2 +- .../AceGUIWidget-WeakAurasIconButton.lua | 4 +- .../AceGUIWidget-WeakAurasImportButton.lua | 6 +- .../AceGUIWidget-WeakAurasInputFocus.lua | 2 +- ...eGUIWidget-WeakAurasLoadedHeaderButton.lua | 8 +-- ...AceGUIWidget-WeakAurasMultiLineEditBox.lua | 2 +- ...get-WeakAurasMultiLineEditBoxWithEnter.lua | 2 +- .../AceGUIWidget-WeakAurasNewButton.lua | 4 +- .../AceGUIWidget-WeakAurasNewHeaderButton.lua | 4 +- ...UIWidget-WeakAurasPendingInstallButton.lua | 4 +- ...GUIWidget-WeakAurasPendingUpdateButton.lua | 4 +- .../AceGUIWidget-WeakAurasSnippetButton.lua | 2 +- .../AceGUIWidget-WeakAurasTextureButton.lua | 4 +- ...ceGUIWidget-WeakAurasTwoColumnDropDown.lua | 2 +- WeakAurasOptions/ActionOptions.lua | 2 +- WeakAurasOptions/AnimationOptions.lua | 2 +- WeakAurasOptions/AuthorOptions.lua | 6 +- WeakAurasOptions/BuffTrigger.lua | 2 +- WeakAurasOptions/BuffTrigger2.lua | 2 +- WeakAurasOptions/Cache.lua | 2 +- WeakAurasOptions/CommonOptions.lua | 2 +- WeakAurasOptions/ConditionOptions.lua | 2 +- WeakAurasOptions/DisplayOptions.lua | 2 +- WeakAurasOptions/ForAllIndentsAndPurposes.lua | 2 +- WeakAurasOptions/GenericTrigger.lua | 2 +- WeakAurasOptions/GroupOptions.lua | 2 +- WeakAurasOptions/InformationOptions.lua | 2 +- WeakAurasOptions/LoadOptions.lua | 2 +- WeakAurasOptions/Locales/deDE.lua | 4 +- WeakAurasOptions/Locales/enUS.lua | 2 +- WeakAurasOptions/Locales/esES.lua | 4 +- WeakAurasOptions/Locales/esMX.lua | 4 +- WeakAurasOptions/Locales/frFR.lua | 4 +- WeakAurasOptions/Locales/itIT.lua | 4 +- WeakAurasOptions/Locales/koKR.lua | 4 +- WeakAurasOptions/Locales/ptBR.lua | 4 +- WeakAurasOptions/Locales/ruRU.lua | 4 +- WeakAurasOptions/Locales/zhCN.lua | 4 +- WeakAurasOptions/Locales/zhTW.lua | 4 +- WeakAurasOptions/OptionsFrames/CodeReview.lua | 2 +- .../OptionsFrames/FrameChooser.lua | 6 +- WeakAurasOptions/OptionsFrames/IconPicker.lua | 2 +- .../OptionsFrames/ImportExport.lua | 2 +- .../OptionsFrames/ModelPicker.lua | 4 +- WeakAurasOptions/OptionsFrames/MoverSizer.lua | 32 +++++------ .../OptionsFrames/OptionsFrame.lua | 10 ++-- WeakAurasOptions/OptionsFrames/TextEditor.lua | 2 +- .../OptionsFrames/TexturePicker.lua | 2 +- WeakAurasOptions/OptionsFrames/Update.lua | 2 +- WeakAurasOptions/RegionOptions/AuraBar.lua | 8 +-- .../RegionOptions/DynamicGroup.lua | 6 +- WeakAurasOptions/RegionOptions/Group.lua | 6 +- WeakAurasOptions/RegionOptions/Icon.lua | 4 +- WeakAurasOptions/RegionOptions/Model.lua | 4 +- .../RegionOptions/ProgressTexture.lua | 6 +- WeakAurasOptions/RegionOptions/StopMotion.lua | 2 +- WeakAurasOptions/RegionOptions/Text.lua | 4 +- WeakAurasOptions/RegionOptions/Texture.lua | 4 +- .../SubRegionOptions/Background.lua | 2 +- WeakAurasOptions/SubRegionOptions/Border.lua | 2 +- WeakAurasOptions/SubRegionOptions/Glow.lua | 2 +- WeakAurasOptions/SubRegionOptions/Model.lua | 2 +- .../SubRegionOptions/SubRegionCommon.lua | 2 +- WeakAurasOptions/SubRegionOptions/SubText.lua | 2 +- WeakAurasOptions/SubRegionOptions/Tick.lua | 2 +- WeakAurasOptions/TriggerOptions.lua | 2 +- WeakAurasOptions/WeakAurasOptions.lua | 4 +- 115 files changed, 332 insertions(+), 261 deletions(-) diff --git a/WeakAuras/Animations.lua b/WeakAuras/Animations.lua index 871c59a..bbf9d71 100644 --- a/WeakAuras/Animations.lua +++ b/WeakAuras/Animations.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Animations diff --git a/WeakAuras/AuraEnvironment.lua b/WeakAuras/AuraEnvironment.lua index 4efb70e..20b4da4 100644 --- a/WeakAuras/AuraEnvironment.lua +++ b/WeakAuras/AuraEnvironment.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/AuraWarnings.lua b/WeakAuras/AuraWarnings.lua index f58185c..e09ac86 100644 --- a/WeakAuras/AuraWarnings.lua +++ b/WeakAuras/AuraWarnings.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/BuffTrigger.lua b/WeakAuras/BuffTrigger.lua index 9d0afc6..538217f 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index 86730b6..4f3e8b7 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs @@ -1708,7 +1708,7 @@ local function RecheckActiveForUnitType(unitType, unit, unitsToRemoveScan) end end -local frame = CreateFrame("FRAME") +local frame = CreateFrame("Frame") WeakAuras.frames["WeakAuras Buff2 Frame"] = frame local function EventHandler(frame, event, arg1, arg2, ...) diff --git a/WeakAuras/Conditions.lua b/WeakAuras/Conditions.lua index 9b8b002..bfd96f2 100644 --- a/WeakAuras/Conditions.lua +++ b/WeakAuras/Conditions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L @@ -843,7 +843,7 @@ function Private.RegisterForGlobalConditions(uid) end if (next(register) and not dynamicConditionsFrame) then - dynamicConditionsFrame = CreateFrame("FRAME"); + dynamicConditionsFrame = CreateFrame("Frame"); dynamicConditionsFrame:SetScript("OnEvent", handleDynamicConditions); dynamicConditionsFrame.units = {} WeakAuras.frames["Rerun Conditions Frame"] = dynamicConditionsFrame @@ -860,7 +860,7 @@ function Private.RegisterForGlobalConditions(uid) if unitEvent and unit then unit = unit:lower() if not dynamicConditionsFrame.units[unit] then - dynamicConditionsFrame.units[unit] = CreateFrame("FRAME"); + dynamicConditionsFrame.units[unit] = CreateFrame("Frame"); dynamicConditionsFrame.units[unit]:SetScript("OnEvent", handleDynamicConditionsPerUnit); end dynamicConditionsFrame.units[unit].unit = unit; @@ -909,7 +909,7 @@ function Private.UnloadAllConditions() dynamicConditions = {} if dynamicConditionsFrame then dynamicConditionsFrame:UnregisterAllEvents() - for unit, frame in pairs(dynamicConditionsFrame.units) do + for _, frame in pairs(dynamicConditionsFrame.units) do frame:UnregisterAllEvents() end dynamicConditionsFrame:SetScript("OnUpdate", nil) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index dec3a4f..8a26d98 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs @@ -1086,7 +1086,7 @@ end local genericTriggerRegisteredEvents = {}; local genericTriggerRegisteredUnitEvents = {}; -local frame = CreateFrame("FRAME"); +local frame = CreateFrame("Frame"); frame.unitFrames = {}; WeakAuras.frames["WeakAuras Generic Trigger Frame"] = frame; frame:RegisterEvent("PLAYER_ENTERING_WORLD"); @@ -1631,7 +1631,7 @@ do update_clients_num = update_clients_num + 1; end if not(update_frame) then - update_frame = CreateFrame("FRAME"); + update_frame = CreateFrame("Frame"); end if not(updating) then update_frame:SetScript("OnUpdate", function() @@ -1885,7 +1885,7 @@ do function WeakAuras.InitSwingTimer() if not(swingTimerFrame) then - swingTimerFrame = CreateFrame("frame"); + swingTimerFrame = CreateFrame("Frame"); swingTimerFrame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED"); swingTimerFrame:RegisterEvent("PLAYER_ENTER_COMBAT"); swingTimerFrame:RegisterEvent("UNIT_ATTACK_SPEED"); @@ -2084,7 +2084,7 @@ do local spellDetails = {} function WeakAuras.InitCooldownReady() - cdReadyFrame = CreateFrame("FRAME"); + cdReadyFrame = CreateFrame("Frame"); WeakAuras.frames["Cooldown Trigger Handler"] = cdReadyFrame cdReadyFrame:RegisterEvent("RUNE_POWER_UPDATE"); cdReadyFrame:RegisterEvent("RUNE_TYPE_UPDATE"); @@ -3350,7 +3350,7 @@ do WeakAuras.frames["Pet Use Handler"] = petFrame; function WeakAuras.WatchForPetDeath() if not(petFrame) then - petFrame = CreateFrame("frame"); + petFrame = CreateFrame("Frame"); petFrame:RegisterEvent("UNIT_PET") petFrame:SetScript("OnEvent", function(_, event, unit) if unit ~= "player" then return end @@ -3445,7 +3445,7 @@ do function WeakAuras.WatchForMounts() if not(mountedFrame) then - mountedFrame = CreateFrame("frame"); + mountedFrame = CreateFrame("Frame"); WeakAuras.frames["Mount Use Handler"] = mountedFrame; mountedFrame:RegisterEvent("COMPANION_UPDATE"); mountedFrame:SetScript("OnEvent", function() @@ -3472,7 +3472,7 @@ do function WeakAuras.WatchPlayerMoveSpeed() if not (playerMovingFrame) then - playerMovingFrame = CreateFrame("frame"); + playerMovingFrame = CreateFrame("Frame"); WeakAuras.frames["Player Moving Frame"] = playerMovingFrame; end playerMovingFrame.speed = GetUnitSpeed("player") @@ -3567,7 +3567,7 @@ end local itemCountWatchFrame; function WeakAuras.RegisterItemCountWatch() if not(itemCountWatchFrame) then - itemCountWatchFrame = CreateFrame("frame"); + itemCountWatchFrame = CreateFrame("Frame"); itemCountWatchFrame:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED"); itemCountWatchFrame:SetScript("OnEvent", function(_, _, unit) if unit ~= "player" then return end @@ -3604,7 +3604,7 @@ do function WeakAuras.WatchQueuedAction() if not(queuedActionFrame) then - queuedActionFrame = CreateFrame("frame"); + queuedActionFrame = CreateFrame("Frame"); WeakAuras.frames["Queued Action Frame"] = queuedActionFrame for slotID = 1, 120 do local spellID = GetActionSpellID(slotID) diff --git a/WeakAuras/History.lua b/WeakAuras/History.lua index b216b24..38566a4 100644 --- a/WeakAuras/History.lua +++ b/WeakAuras/History.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index bbceab9..ea3c50c 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -33,13 +33,64 @@ WeakAuras.prettyPrint = function(...) print("|cff9900ffWeakAuras:|r ", ...) end +-- Force enable WeakAurasCompanion and Archive because some addon managers interfere with it +EnableAddOn("WeakAurasCompanion") +EnableAddOn("WeakAurasArchive") + +local libsAreOk = true +do + local StandAloneLibs = { + "Archivist", + "LibStub" + } + local LibStubLibs = { + "CallbackHandler-1.0", + "AceConfig-3.0", + "AceConsole-3.0", + "AceGUI-3.0", + "AceEvent-3.0", + "AceGUISharedMediaWidgets-1.0", + "AceTimer-3.0", + "AceSerializer-3.0", + "AceComm-3.0", + "LibSharedMedia-3.0", + "LibDataBroker-1.1", + "LibCompress", + "SpellRange-1.0", + "LibCustomGlow-1.0", + "LibDBIcon-1.0", + "LibGetFrame-1.0", + "LibSerialize", + } + for _, lib in ipairs(StandAloneLibs) do + if not lib then + libsAreOk = false + WeakAuras.prettyPrint("Missing library:", lib) + end + end + if LibStub then + for _, lib in ipairs(LibStubLibs) do + if not LibStub:GetLibrary(lib, true) then + libsAreOk = false + WeakAuras.prettyPrint("Missing library:", lib) + end + end + else + libsAreOk = false + end +end + +function WeakAuras.IsLibsOK() + return libsAreOk +end + if versionString ~= versionStringFromToc and versionStringFromToc ~= "Dev" then WeakAuras.prettyPrint("You need to restart your game client to complete the WeakAuras update!") end --- Force enable WeakAurasCompanion and Archive because some addon managers interfere with it -EnableAddOn("WeakAurasCompanion") -EnableAddOn("WeakAurasArchive") +if not WeakAuras.IsLibsOK() then + WeakAuras.prettyPrint("WeakAuras is missing necessary libraries. Please reinstall a proper package.") +end -- These function stubs are defined here to reduce the number of errors that occur if WeakAuras.lua fails to compile function WeakAuras.RegisterRegionType() diff --git a/WeakAuras/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua b/WeakAuras/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua index cb09a23..97651ad 100644 --- a/WeakAuras/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua +++ b/WeakAuras/Libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua @@ -713,7 +713,7 @@ do button:SetScript("OnLeave",Control_OnLeave) button:SetScript("OnClick",Dropdown_TogglePullout) - local button_cover = CreateFrame("BUTTON",nil,self.frame) + local button_cover = CreateFrame("Button",nil,self.frame) self.button_cover = button_cover button_cover.obj = self button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25) diff --git a/WeakAuras/Locales/deDE.lua b/WeakAuras/Locales/deDE.lua index bc44d09..f47562e 100644 --- a/WeakAuras/Locales/deDE.lua +++ b/WeakAuras/Locales/deDE.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "deDE") then +if GetLocale() ~= "deDE" then return end diff --git a/WeakAuras/Locales/esES.lua b/WeakAuras/Locales/esES.lua index 07a2afd..67638df 100644 --- a/WeakAuras/Locales/esES.lua +++ b/WeakAuras/Locales/esES.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "esES") then +if GetLocale() ~= "esES" then return end diff --git a/WeakAuras/Locales/esMX.lua b/WeakAuras/Locales/esMX.lua index 0612c6a..6a2de5a 100644 --- a/WeakAuras/Locales/esMX.lua +++ b/WeakAuras/Locales/esMX.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "esMX") then +if GetLocale() ~= "esMX" then return end diff --git a/WeakAuras/Locales/frFR.lua b/WeakAuras/Locales/frFR.lua index b81903b..e01b372 100644 --- a/WeakAuras/Locales/frFR.lua +++ b/WeakAuras/Locales/frFR.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "frFR") then +if GetLocale() ~= "frFR" then return end diff --git a/WeakAuras/Locales/itIT.lua b/WeakAuras/Locales/itIT.lua index ec6c3c6..b18b6f9 100644 --- a/WeakAuras/Locales/itIT.lua +++ b/WeakAuras/Locales/itIT.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "itIT") then +if GetLocale() ~= "itIT" then return end diff --git a/WeakAuras/Locales/koKR.lua b/WeakAuras/Locales/koKR.lua index 4a9579e..a98381d 100644 --- a/WeakAuras/Locales/koKR.lua +++ b/WeakAuras/Locales/koKR.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "koKR") then +if GetLocale() ~= "koKR" then return end diff --git a/WeakAuras/Locales/ptBR.lua b/WeakAuras/Locales/ptBR.lua index 91778eb..9ce7aad 100644 --- a/WeakAuras/Locales/ptBR.lua +++ b/WeakAuras/Locales/ptBR.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "ptBR") then +if GetLocale() ~= "ptBR" then return end diff --git a/WeakAuras/Locales/ruRU.lua b/WeakAuras/Locales/ruRU.lua index 3745be1..1e7204e 100644 --- a/WeakAuras/Locales/ruRU.lua +++ b/WeakAuras/Locales/ruRU.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "ruRU") then +if GetLocale() ~= "ruRU" then return end diff --git a/WeakAuras/Locales/zhCN.lua b/WeakAuras/Locales/zhCN.lua index d763389..75bd5da 100644 --- a/WeakAuras/Locales/zhCN.lua +++ b/WeakAuras/Locales/zhCN.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "zhCN") then +if GetLocale() ~= "zhCN" then return end diff --git a/WeakAuras/Locales/zhTW.lua b/WeakAuras/Locales/zhTW.lua index 56007af..e2cbafc 100644 --- a/WeakAuras/Locales/zhTW.lua +++ b/WeakAuras/Locales/zhTW.lua @@ -1,4 +1,4 @@ -if not(GetLocale() == "zhTW") then +if GetLocale() ~= "zhTW" then return end diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index c92d467..07fb46f 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L @@ -1160,6 +1160,17 @@ function Private.Modernize(data) end end + if (data.internalVersion < 51) then + for _, triggerData in ipairs(data.triggers) do + if triggerData.trigger.event == "Threat Situation" then + triggerData.trigger.unit = triggerData.trigger.threatUnit + triggerData.trigger.use_unit = triggerData.trigger.use_threatUnit + triggerData.trigger.threatUnit = nil + triggerData.trigger.use_threatUnit = nil + end + end + end + if (data.internalVersion < 52) then local function matchTarget(input) return input == "target" or input == "'target'" or input == "\"target\"" or input == "%t" or input == "'%t'" or input == "\"%t\"" diff --git a/WeakAuras/Profiling.lua b/WeakAuras/Profiling.lua index 7d7ba6a..1db3605 100644 --- a/WeakAuras/Profiling.lua +++ b/WeakAuras/Profiling.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras @@ -446,14 +446,10 @@ function WeakAuras.PrintProfile() PrintOneProfile(popup, "|cff9900ffTotal time:|r", profileData.systems.time) PrintOneProfile(popup, "|cff9900ffTime inside WA:|r", profileData.systems.wa) popup:AddText(string.format("|cff9900ffTime spent inside WA:|r %.2f%%", 100 * profileData.systems.wa.elapsed / profileData.systems.time.elapsed)) - popup:AddText("") - popup:AddText("|cff9900ffSystems:|r") - for i, k in ipairs(SortProfileMap(profileData.systems)) do - if (k ~= "time" and k ~= "wa") then - PrintOneProfile(popup, k, profileData.systems[k], profileData.systems.wa.elapsed) - end - end + popup:AddText("") + popup:AddText("Note: Not every aspect of each aura can be tracked.") + popup:AddText("You can ask on our discord https://discord.gg/weakauras for help interpreting this output.") popup:AddText("") popup:AddText("|cff9900ffAuras:|r") @@ -462,6 +458,14 @@ function WeakAuras.PrintProfile() for i, k in ipairs(SortProfileMap(profileData.auras)) do PrintOneProfile(popup, k, profileData.auras[k], total) end + + popup:AddText("") + popup:AddText("|cff9900ffSystems:|r") + for i, k in ipairs(SortProfileMap(profileData.systems)) do + if (k ~= "time" and k ~= "wa") then + PrintOneProfile(popup, k, profileData.systems[k], profileData.systems.wa.elapsed) + end + end popup:Show() end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 8477517..3fa8e8b 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs @@ -133,7 +133,7 @@ Private.function_strings = { ]] }; -local hsvFrame = CreateFrame("Colorselect") +local hsvFrame = CreateFrame("ColorSelect") -- HSV transition, for a much prettier color transition in many cases -- see http://www.wowinterface.com/forums/showthread.php?t=48236 @@ -1084,7 +1084,7 @@ Private.load_prototype = { multiEntry = { operator = "or" }, - test = "IsEquippedItem(%s)", + test = "IsEquippedItem(GetItemInfo(%s))", events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"} }, { @@ -1094,7 +1094,7 @@ Private.load_prototype = { multiEntry = { operator = "or" }, - test = "not IsEquippedItem(%s)", + test = "not IsEquippedItem(GetItemInfo(%s))", events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"} }, } @@ -5440,7 +5440,7 @@ Private.event_prototypes = { local ret = [[ local inverse = %s; - local equipped = IsEquippedItem(%s); + local equipped = IsEquippedItem(GetItemInfo(%s)); ]]; return ret:format(trigger.use_inverse and "true" or "false", itemName); @@ -5555,18 +5555,20 @@ Private.event_prototypes = { ["Threat Situation"] = { type = "unit", events = function(trigger) + local unit = trigger.unit local result = {} - if trigger.threatUnit and trigger.threatUnit ~= "none" then - AddUnitEventForEvents(result, trigger.threatUnit, "UNIT_THREAT_LIST_UPDATE") + if unit and unit ~= "none" then + AddUnitEventForEvents(result, unit, "UNIT_THREAT_LIST_UPDATE") else AddUnitEventForEvents(result, "player", "UNIT_THREAT_SITUATION_UPDATE") end return result end, internal_events = function(trigger) + local unit = trigger.unit local result = {} - if trigger.threatUnit and trigger.threatUnit ~= "none" then - AddUnitChangeInternalEvents(trigger.threatUnit, result) + if unit and unit ~= "none" then + AddUnitChangeInternalEvents(unit, result) end return result end, @@ -5576,14 +5578,15 @@ Private.event_prototypes = { AddWatchedUnits(unit) end end, - force_events = "UNIT_THREAT_LIST_UPDATE", + force_events = unitHelperFunctions.UnitChangedForceEvents, name = L["Threat Situation"], init = function(trigger) + trigger.unit = trigger.unit or "target"; local ret = [[ - local unit = %s + unit = string.lower(unit) local ok = true local aggro, status, threatpct, rawthreatpct, threatvalue, threattotal - if unit then + if unit and unit ~= "none" then aggro, status, threatpct, rawthreatpct, threatvalue = WeakAuras.UnitDetailedThreatSituation('player', unit) threattotal = (threatvalue or 0) * 100 / (threatpct ~= 0 and threatpct or 1) else @@ -5592,18 +5595,20 @@ Private.event_prototypes = { threatpct, rawthreatpct, threatvalue, threattotal = 100, 100, 0, 100 end ]]; - return ret:format(trigger.threatUnit and trigger.threatUnit ~= "none" and "[["..trigger.threatUnit.."]]" or "nil"); + return ret; end, canHaveDuration = true, - statesParameter = "one", + statesParameter = "unit", args = { { - name = "threatUnit", + name = "unit", display = L["Unit"], required = true, type = "unit", + init = "arg", values = "threat_unit_types", test = "true", + store = true, default = "target" }, { @@ -5628,7 +5633,7 @@ Private.event_prototypes = { type = "number", store = true, conditionType = "number", - enable = function(trigger) return trigger.threatUnit ~= "none" end, + enable = function(trigger) return trigger.unit ~= "none" end, multiEntry = { operator = "and", limit = 2 @@ -5641,7 +5646,7 @@ Private.event_prototypes = { type = "number", store = true, conditionType = "number", - enable = function(trigger) return trigger.threatUnit ~= "none" end, + enable = function(trigger) return trigger.unit ~= "none" end, multiEntry = { operator = "and", limit = 2 @@ -5654,7 +5659,7 @@ Private.event_prototypes = { type = "number", store = true, conditionType = "number", - enable = function(trigger) return trigger.threatUnit ~= "none" end, + enable = function(trigger) return trigger.unit ~= "none" end, multiEntry = { operator = "and", limit = 2 diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index 82f1a97..1fc87c9 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -1004,19 +1004,19 @@ end -- Called when first creating a new region/display local function create(parent) -- Create overall region (containing everything else) - local region = CreateFrame("FRAME", nil, parent); + local region = CreateFrame("Frame", nil, parent); region.regionType = "aurabar" region:SetMovable(true); region:SetResizable(true); region:SetMinResize(1, 1); -- Create statusbar (inherit prototype) - local bar = CreateFrame("FRAME", nil, region); + local bar = CreateFrame("Frame", nil, region); WeakAuras.Mixin(bar, SmoothStatusBarMixin); local fg = bar:CreateTexture(nil, "BORDER"); local bg = bar:CreateTexture(nil, "BACKGROUND"); bg:SetAllPoints(); - local fgFrame = CreateFrame("FRAME", nil, bar) + local fgFrame = CreateFrame("Frame", nil, bar) local spark = bar:CreateTexture(nil, "ARTWORK"); bar.fg = fg; bar.fgFrame = fgFrame @@ -1031,7 +1031,7 @@ local function create(parent) region.bar = bar; -- Create icon - local iconFrame = CreateFrame("FRAME", nil, region); + local iconFrame = CreateFrame("Frame", nil, region); region.iconFrame = iconFrame; local icon = iconFrame:CreateTexture(nil, "OVERLAY"); region.icon = icon; @@ -1187,7 +1187,7 @@ local function modify(parent, region, data) if tooltipType and data.useTooltip then -- Create and enable tooltip-hover frame if not region.tooltipFrame then - region.tooltipFrame = CreateFrame("frame", nil, region); + region.tooltipFrame = CreateFrame("Frame", nil, region); region.tooltipFrame:SetAllPoints(icon); region.tooltipFrame:SetScript("OnEnter", function() Private.ShowMouseoverTooltip(region, region.tooltipFrame); diff --git a/WeakAuras/RegionTypes/DynamicGroup.lua b/WeakAuras/RegionTypes/DynamicGroup.lua index 7aed002..54ad403 100644 --- a/WeakAuras/RegionTypes/DynamicGroup.lua +++ b/WeakAuras/RegionTypes/DynamicGroup.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras @@ -79,7 +79,7 @@ local controlPointFunctions = { } local function createControlPoint(self) - local controlPoint = CreateFrame("FRAME", nil, self.parent) + local controlPoint = CreateFrame("Frame", nil, self.parent) WeakAuras.Mixin(controlPoint, controlPointFunctions) controlPoint:SetWidth(16) @@ -103,14 +103,14 @@ local function releaseControlPoint(self, controlPoint) end local function create(parent) - local region = CreateFrame("FRAME", nil, parent) + local region = CreateFrame("Frame", nil, parent) region.regionType = "dynamicgroup" region:SetSize(16, 16) region:SetMovable(true) region.sortedChildren = {} region.controlledChildren = {} region.updatedChildren = {} - local background = CreateFrame("frame", nil, region) + local background = CreateFrame("Frame", nil, region) region.background = background region.selfPoint = "TOPLEFT" region.controlPoints = CreateObjectPool(createControlPoint, releaseControlPoint) diff --git a/WeakAuras/RegionTypes/Group.lua b/WeakAuras/RegionTypes/Group.lua index 57f9312..1ed9f39 100644 --- a/WeakAuras/RegionTypes/Group.lua +++ b/WeakAuras/RegionTypes/Group.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -25,14 +25,14 @@ local default = { -- Called when first creating a new region/display local function create(parent) -- Main region - local region = CreateFrame("FRAME", nil, parent); + local region = CreateFrame("Frame", nil, parent); region.regionType = "group" region:SetMovable(true); region:SetWidth(2); region:SetHeight(2); -- Border region - local border = CreateFrame("frame", nil, region); + local border = CreateFrame("Frame", nil, region); region.border = border; WeakAuras.regionPrototype.create(region); diff --git a/WeakAuras/RegionTypes/Icon.lua b/WeakAuras/RegionTypes/Icon.lua index b89af10..b3306ce 100644 --- a/WeakAuras/RegionTypes/Icon.lua +++ b/WeakAuras/RegionTypes/Icon.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -143,7 +143,7 @@ local function AnchorSubRegion(self, subRegion, anchorType, selfPoint, anchorPoi local anchorRegion = self.icon if anchorPoint:sub(1, 6) == "INNER_" then if not self.inner then - self.inner = CreateFrame("FRAME", nil, self) + self.inner = CreateFrame("Frame", nil, self) self.inner:SetPoint("CENTER") self.UpdateInnerOuterSize() end @@ -151,7 +151,7 @@ local function AnchorSubRegion(self, subRegion, anchorType, selfPoint, anchorPoi anchorPoint = anchorPoint:sub(7) elseif anchorPoint:sub(1, 6) == "OUTER_" then if not self.outer then - self.outer = CreateFrame("FRAME", nil, self) + self.outer = CreateFrame("Frame", nil, self) self.outer:SetPoint("CENTER") self.UpdateInnerOuterSize() end @@ -243,7 +243,7 @@ end local function create(parent, data) local font = "GameFontHighlight"; - local region = CreateFrame("FRAME", nil, parent); + local region = CreateFrame("Frame", nil, parent); region.regionType = "icon" region:SetMovable(true); region:SetResizable(true); @@ -312,7 +312,7 @@ local function create(parent, data) end region.frameId = frameId; - local cooldown = CreateFrame("COOLDOWN", "WeakAurasCooldown"..frameId, region, "CooldownFrameTemplate"); + local cooldown = CreateFrame("Cooldown", "WeakAurasCooldown"..frameId, region, "CooldownFrameTemplate"); region.cooldown = cooldown; cooldown:SetAllPoints(icon); @@ -428,7 +428,7 @@ local function modify(parent, region, data) local tooltipType = Private.CanHaveTooltip(data); if(tooltipType and data.useTooltip) then if not region.tooltipFrame then - region.tooltipFrame = CreateFrame("frame", nil, region); + region.tooltipFrame = CreateFrame("Frame", nil, region); region.tooltipFrame:SetAllPoints(region); region.tooltipFrame:SetScript("OnEnter", function() Private.ShowMouseoverTooltip(region, region); diff --git a/WeakAuras/RegionTypes/Model.lua b/WeakAuras/RegionTypes/Model.lua index 6e6a5f9..73db987 100644 --- a/WeakAuras/RegionTypes/Model.lua +++ b/WeakAuras/RegionTypes/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -69,14 +69,14 @@ local regionFunctions = { -- Called when first creating a new region/display local function create(parent) -- Main region - local region = CreateFrame("FRAME", nil, UIParent); + local region = CreateFrame("Frame", nil, UIParent); region.regionType = "model" region:SetMovable(true); region:SetResizable(true); region:SetMinResize(1, 1); -- Border region - local border = CreateFrame("frame", nil, region); + local border = CreateFrame("Frame", nil, region); region.border = border; WeakAuras.regionPrototype.create(region); diff --git a/WeakAuras/RegionTypes/ProgressTexture.lua b/WeakAuras/RegionTypes/ProgressTexture.lua index 20fc4e1..cf188e4 100644 --- a/WeakAuras/RegionTypes/ProgressTexture.lua +++ b/WeakAuras/RegionTypes/ProgressTexture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; @@ -424,7 +424,7 @@ WeakAuras.createSpinner = createSpinner; local function create(parent) local font = "GameFontHighlight"; - local region = CreateFrame("FRAME", nil, parent); + local region = CreateFrame("Frame", nil, parent); region.regionType = "progresstexture" region:SetMovable(true); region:SetResizable(true); diff --git a/WeakAuras/RegionTypes/RegionPrototype.lua b/WeakAuras/RegionTypes/RegionPrototype.lua index ed46aac..443d1c8 100644 --- a/WeakAuras/RegionTypes/RegionPrototype.lua +++ b/WeakAuras/RegionTypes/RegionPrototype.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras; @@ -624,7 +624,7 @@ end local regionsForFrameTick = {} -local frameForFrameTick = CreateFrame("FRAME"); +local frameForFrameTick = CreateFrame("Frame"); WeakAuras.frames["Frame Tick Frame"] = frameForFrameTick diff --git a/WeakAuras/RegionTypes/StopMotion.lua b/WeakAuras/RegionTypes/StopMotion.lua index 5863394..81a68f2 100644 --- a/WeakAuras/RegionTypes/StopMotion.lua +++ b/WeakAuras/RegionTypes/StopMotion.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local texture_types = WeakAuras.StopMotion.texture_types; @@ -90,7 +90,7 @@ local properties = { WeakAuras.regionPrototype.AddProperties(properties, default); local function create(parent) - local frame = CreateFrame("FRAME", nil, UIParent); + local frame = CreateFrame("Frame", nil, UIParent); frame.regionType = "stopmotion" frame:SetMovable(true); frame:SetResizable(true); diff --git a/WeakAuras/RegionTypes/Text.lua b/WeakAuras/RegionTypes/Text.lua index e676fea..33df1e4 100644 --- a/WeakAuras/RegionTypes/Text.lua +++ b/WeakAuras/RegionTypes/Text.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -54,7 +54,7 @@ local function GetProperties(data) end local function create(parent) - local region = CreateFrame("FRAME", nil, parent); + local region = CreateFrame("Frame", nil, parent); region.regionType = "text" region:SetMovable(true); @@ -98,7 +98,7 @@ local function modify(parent, region, data) local tooltipType = Private.CanHaveTooltip(data); if(tooltipType and data.useTooltip) then if not region.tooltipFrame then - region.tooltipFrame = CreateFrame("frame", nil, region); + region.tooltipFrame = CreateFrame("Frame", nil, region); region.tooltipFrame:SetAllPoints(region); region.tooltipFrame:SetScript("OnEnter", function() Private.ShowMouseoverTooltip(region, region); diff --git a/WeakAuras/RegionTypes/Texture.lua b/WeakAuras/RegionTypes/Texture.lua index 4bb3e38..cf5fbad 100644 --- a/WeakAuras/RegionTypes/Texture.lua +++ b/WeakAuras/RegionTypes/Texture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local L = WeakAuras.L; @@ -68,7 +68,7 @@ local properties = { WeakAuras.regionPrototype.AddProperties(properties, default); local function create(parent) - local region = CreateFrame("FRAME", nil, UIParent); + local region = CreateFrame("Frame", nil, UIParent); region.regionType = "texture" region:SetMovable(true); region:SetResizable(true); diff --git a/WeakAuras/SubRegionTypes/Background.lua b/WeakAuras/SubRegionTypes/Background.lua index 3320c40..97bf3a0 100644 --- a/WeakAuras/SubRegionTypes/Background.lua +++ b/WeakAuras/SubRegionTypes/Background.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 1275bf3..d1d3984 100644 --- a/WeakAuras/SubRegionTypes/Border.lua +++ b/WeakAuras/SubRegionTypes/Border.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -34,7 +34,7 @@ local properties = { local function create() - return CreateFrame("FRAME", nil, UIParent) + return CreateFrame("Frame", nil, UIParent) end local function onAcquire(subRegion) diff --git a/WeakAuras/SubRegionTypes/Glow.lua b/WeakAuras/SubRegionTypes/Glow.lua index 8c93d4b..922ea1f 100644 --- a/WeakAuras/SubRegionTypes/Glow.lua +++ b/WeakAuras/SubRegionTypes/Glow.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -297,7 +297,7 @@ local funcs = { } local function create() - local region = CreateFrame("FRAME", nil, UIParent) + local region = CreateFrame("Frame", nil, UIParent) for name, func in pairs(funcs) do region[name] = func diff --git a/WeakAuras/SubRegionTypes/Model.lua b/WeakAuras/SubRegionTypes/Model.lua index 21eb44e..77dc88a 100644 --- a/WeakAuras/SubRegionTypes/Model.lua +++ b/WeakAuras/SubRegionTypes/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -155,7 +155,7 @@ local funcs = { } local function create() - local subRegion = CreateFrame("FRAME", nil, UIParent) + local subRegion = CreateFrame("Frame", nil, UIParent) --subRegion:SetClipsChildren(true) for k, v in pairs(funcs) do diff --git a/WeakAuras/SubRegionTypes/SubText.lua b/WeakAuras/SubRegionTypes/SubText.lua index f83e451..81e55a1 100644 --- a/WeakAuras/SubRegionTypes/SubText.lua +++ b/WeakAuras/SubRegionTypes/SubText.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -101,7 +101,7 @@ local properties = { } local function create() - local region = CreateFrame("FRAME", nil, UIParent); + local region = CreateFrame("Frame", nil, UIParent); local text = region:CreateFontString(nil, "OVERLAY"); region.text = text; diff --git a/WeakAuras/SubRegionTypes/Tick.lua b/WeakAuras/SubRegionTypes/Tick.lua index 8aaae83..772435e 100644 --- a/WeakAuras/SubRegionTypes/Tick.lua +++ b/WeakAuras/SubRegionTypes/Tick.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -107,7 +107,7 @@ local auraBarAnchorInverse = { } local function create() - local subRegion = CreateFrame("FRAME", nil, UIParent) + local subRegion = CreateFrame("Frame", nil, UIParent) subRegion.texture = subRegion:CreateTexture() subRegion.texture:SetDrawLayer("ARTWORK", 3) subRegion.texture:SetAllPoints(subRegion) diff --git a/WeakAuras/Transmission.lua b/WeakAuras/Transmission.lua index 761689e..77210f7 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... -- Lua APIs diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 810ce42..0c76851 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, Private = ... local WeakAuras = WeakAuras; @@ -150,8 +150,8 @@ local simpleFormatters = { local fmt, time = SecondsToTimeAbbrev(value) -- Remove the space between the value and unit return fmt:gsub(" ", ""):format(time) - end - } + end, + }, } Private.format_types = { @@ -257,7 +257,7 @@ Private.format_types = { if value < threshold then return string.format(formatString, value) else - return mainFormater(value, state) + return mainFormater(value) end end end @@ -874,7 +874,7 @@ local function update_forms() end end end -local form_frame = CreateFrame("frame"); +local form_frame = CreateFrame("Frame"); form_frame:RegisterEvent("UPDATE_SHAPESHIFT_FORMS") form_frame:RegisterEvent("PLAYER_LOGIN") form_frame:SetScript("OnEvent", update_forms); diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index baafcc5..a386550 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -30,7 +30,7 @@ LibStub("AceTimer-3.0"):Embed(WeakAurasTimers) Private.watched_trigger_events = {} --- The worlds simplest callback system +-- The worlds simplest callback system. -- That supports 1:N, but no deregistration and breaks if registrating in a callback Private.callbacks = {} Private.callbacks.events = {} @@ -141,7 +141,7 @@ function SlashCmdList.WEAKAURAS(input) end end -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end function Private.ToggleMinimap() WeakAurasSaved.minimap.hide = not WeakAurasSaved.minimap.hide @@ -913,7 +913,7 @@ local function tooltip_draw() tooltip:Show(); end -local colorFrame = CreateFrame("frame"); +local colorFrame = CreateFrame("Frame"); WeakAuras.frames["LDB Icon Recoloring"] = colorFrame; local colorElapsed = 0; @@ -921,7 +921,7 @@ local colorDelay = 2; local r, g, b = 0.8, 0, 1; local r2, g2, b2 = random(2)-1, random(2)-1, random(2)-1; -local tooltip_update_frame = CreateFrame("FRAME"); +local tooltip_update_frame = CreateFrame("Frame"); WeakAuras.frames["LDB Tooltip Updater"] = tooltip_update_frame; -- function copied from LibDBIcon-1.0.lua @@ -1102,12 +1102,12 @@ function Private.Login(initialTime, takeNewSnapshots) end end -local WeakAurasFrame = CreateFrame("FRAME", "WeakAurasFrame", UIParent); +local WeakAurasFrame = CreateFrame("Frame", "WeakAurasFrame", UIParent); WeakAuras.frames["WeakAuras Main Frame"] = WeakAurasFrame; WeakAurasFrame:SetAllPoints(UIParent); WeakAurasFrame:SetFrameStrata("BACKGROUND"); -local loadedFrame = CreateFrame("FRAME"); +local loadedFrame = CreateFrame("Frame"); WeakAuras.frames["Addon Initialization Handler"] = loadedFrame; loadedFrame:RegisterEvent("ADDON_LOADED"); loadedFrame:RegisterEvent("PLAYER_LOGIN"); @@ -1446,7 +1446,7 @@ function Private.ScanForLoads(toCheck, event, arg1, ...) scanForLoadsImpl(toCheck, event, arg1, ...) end -local loadFrame = CreateFrame("FRAME"); +local loadFrame = CreateFrame("Frame"); WeakAuras.loadFrame = loadFrame; WeakAuras.frames["Display Load Handling"] = loadFrame; @@ -1473,7 +1473,7 @@ loadFrame:RegisterEvent("PLAYER_UNGHOST") loadFrame:RegisterEvent("PLAYER_FLAGS_CHANGED") loadFrame:RegisterEvent("PARTY_LEADER_CHANGED") -local unitLoadFrame = CreateFrame("FRAME"); +local unitLoadFrame = CreateFrame("Frame"); WeakAuras.unitLoadFrame = unitLoadFrame; WeakAuras.frames["Display Load Handling 2"] = unitLoadFrame; @@ -3564,7 +3564,7 @@ end local dynFrame = {}; do -- Internal data - dynFrame.frame = CreateFrame("frame"); + dynFrame.frame = CreateFrame("Frame"); dynFrame.update = {}; dynFrame.size = 0; @@ -4474,12 +4474,12 @@ local function ensureMouseFrame() if (mouseFrame) then return; end - mouseFrame = CreateFrame("FRAME", "WeakAurasAttachToMouseFrame", UIParent); + mouseFrame = CreateFrame("Frame", "WeakAurasAttachToMouseFrame", UIParent); mouseFrame.attachedVisibleFrames = {}; mouseFrame:SetWidth(1); mouseFrame:SetHeight(1); - local moverFrame = CreateFrame("FRAME", "WeakAurasMousePointerFrame", mouseFrame); + local moverFrame = CreateFrame("Frame", "WeakAurasMousePointerFrame", mouseFrame); mouseFrame.moverFrame = moverFrame; moverFrame:SetPoint("TOPLEFT", mouseFrame, "CENTER"); moverFrame:SetWidth(32); @@ -4794,7 +4794,7 @@ local function postponeAnchor(id) end end -local HiddenFrames = CreateFrame("FRAME", "WeakAurasHiddenFrames") +local HiddenFrames = CreateFrame("Frame", "WeakAurasHiddenFrames") HiddenFrames:Hide() WeakAuras.HiddenFrames = HiddenFrames diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua index 0ba0539..1fb5ff2 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIContainer-WeakAurasTreeGroup.lua @@ -3,7 +3,7 @@ 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasTreeGroup", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua index ef21408..773881a 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 b99ed4e..57da6ef 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local tinsert, tconcat, tremove, wipe = table.insert, table.concat, table.remove, wipe @@ -1855,7 +1855,7 @@ local function Constructor() renamebox:Hide(); end); - local group = CreateFrame("BUTTON", nil, button); + local group = CreateFrame("Button", nil, button); button.group = group; group:SetWidth(16); group:SetHeight(16); @@ -1870,7 +1870,7 @@ local function Constructor() group:SetScript("OnEnter", function() Show_Tooltip(button, L["Group (verb)"], L["Put this display in a group"]) end); group:SetScript("OnLeave", Hide_Tooltip); - local ungroup = CreateFrame("BUTTON", nil, button); + local ungroup = CreateFrame("Button", nil, button); button.ungroup = ungroup; ungroup:SetWidth(11); ungroup:SetHeight(11); @@ -1885,7 +1885,7 @@ local function Constructor() ungroup:SetScript("OnLeave", Hide_Tooltip); ungroup:Hide(); - local upgroup = CreateFrame("BUTTON", nil, button); + local upgroup = CreateFrame("Button", nil, button); button.upgroup = upgroup; upgroup:SetWidth(11); upgroup:SetHeight(11); @@ -1902,7 +1902,7 @@ local function Constructor() upgroup:SetScript("OnLeave", Hide_Tooltip); upgroup:Hide(); - local downgroup = CreateFrame("BUTTON", nil, button); + local downgroup = CreateFrame("Button", nil, button); button.downgroup = downgroup; downgroup:SetWidth(11); downgroup:SetHeight(11); @@ -1918,7 +1918,7 @@ local function Constructor() downgroup:SetScript("OnLeave", Hide_Tooltip); downgroup:Hide(); - local expand = CreateFrame("BUTTON", nil, button); + local expand = CreateFrame("Button", nil, button); button.expand = expand; expand.expanded = true; expand.disabled = true; diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua index e1132d9..9d96e9a 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpand.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Button Widget for our Expand button -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasExpand", 3 diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua index 8f2b5d9..a4bb427 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandAnchor.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Anchor for a Expandable section -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local Type, Version = "WeakAurasExpandAnchor", 2 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua index 5593e51..d7a2ca8 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasExpandSmall.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- Button Widget for our Expand button -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local Type, Version = "WeakAurasExpandSmall", 2 diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua index c6ebfbb..bd164aa 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIcon.lua @@ -3,7 +3,7 @@ Icon Widget that allows for a tooltip, by preventing SetLabel from actually setting a label Graphical Button. -------------------------------------------------------------------------------]] -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasIcon", 1 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua index 3306deb..13a0724 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasIconButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasIconButton", 21 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -62,7 +62,7 @@ Constructor -------------------------------------------------------------------------------]] local function Constructor() - local button = CreateFrame("BUTTON", nil, UIParent); + local button = CreateFrame("Button", nil, UIParent); button:SetHeight(52); button:SetWidth(52); diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua index fc47819..c372f97 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasImportButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasImportButton", 20 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -124,7 +124,7 @@ Constructor local function Constructor() local name = "WeakAurasImportButton"..AceGUI:GetNextWidgetNum(Type); - local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate"); + local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate"); button:SetHeight(18); button:SetWidth(380); button.dgroup = nil; @@ -136,7 +136,7 @@ local function Constructor() background:SetVertexColor(0.5, 0.5, 0.5, 0.25); background:SetAllPoints(button); - local expand = CreateFrame("BUTTON", nil, button); + local expand = CreateFrame("Button", nil, button); button.expand = expand; expand.expanded = true; expand.disabled = true; diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua index a510470..478c58e 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() then return end +if not WeakAuras.IsCorrectVersion() or 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 a99a6dc..3e0fadd 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasLoadedHeaderButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasLoadedHeaderButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasLoadedHeaderButton", 22 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -142,7 +142,7 @@ Constructor local function Constructor() local name = Type..AceGUI:GetNextWidgetNum(Type) - local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate"); + local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate"); button:SetHeight(20); button:SetWidth(1000); button:SetDisabledFontObject("GameFontNormal"); @@ -154,7 +154,7 @@ local function Constructor() background:SetVertexColor(0.5, 0.5, 0.5, 0.6); background:SetAllPoints(button); - local expand = CreateFrame("BUTTON", nil, button); + local expand = CreateFrame("Button", nil, button); button.expand = expand; expand.expanded = true; expand.disabled = true; @@ -172,7 +172,7 @@ local function Constructor() expand:SetScript("OnEnter", function() Show_Tooltip(button, expand.title, expand.desc) end); expand:SetScript("OnLeave", Hide_Tooltip); - local view = CreateFrame("BUTTON", nil, button); + local view = CreateFrame("Button", nil, button); button.view = view; view:SetWidth(16); view:SetHeight(16); diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua index e179ab2..2a6a67b 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBox.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasMultiLineEditBox", 35 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua index eacbd81..3fd968c 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 1dfa80b..32099fb 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasNewButton", 24 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -90,7 +90,7 @@ Constructor local function Constructor() local name = "WeakAurasDisplayButton"..AceGUI:GetNextWidgetNum(Type); - local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate"); + local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate"); button:SetHeight(40); button:SetWidth(380); button.dgroup = nil; diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua index d01b27b..6d489e5 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasNewHeaderButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasNewHeaderButton", 20 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -56,7 +56,7 @@ Constructor local function Constructor() local name = Type..AceGUI:GetNextWidgetNum(Type) - local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate"); + local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate"); button:SetHeight(20); button:SetWidth(1000); button:SetDisabledFontObject("GameFontNormal"); diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua index 72a800c..40b0555 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingInstallButton.lua @@ -160,7 +160,7 @@ Constructor local function Constructor() local name = "WeakAurasPendingInstallButton" .. AceGUI:GetNextWidgetNum(Type) - local button = CreateFrame("BUTTON", name, UIParent) + local button = CreateFrame("Button", name, UIParent) button:SetHeight(32) button:SetWidth(1000) button.data = {} @@ -191,7 +191,7 @@ local function Constructor() button.description = {} - local update = CreateFrame("BUTTON", nil, button) + local update = CreateFrame("Button", nil, button) button.update = update update.disabled = true update.func = function() diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua index 6e76883..e2e4ff5 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasPendingUpdateButton.lua @@ -289,7 +289,7 @@ Constructor local function Constructor() local name = "WeakAurasPendingUpdateButton" .. AceGUI:GetNextWidgetNum(Type) - local button = CreateFrame("BUTTON", name, UIParent) + local button = CreateFrame("Button", name, UIParent) button:SetHeight(32) button:SetWidth(1000) button.data = {} @@ -320,7 +320,7 @@ local function Constructor() button.description = {} - local update = CreateFrame("BUTTON", nil, button) + local update = CreateFrame("Button", nil, button) button.update = update update.disabled = true update.func = function() diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua index 6d8564c..21354e3 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSnippetButton.lua @@ -137,7 +137,7 @@ local function Constructor() button:SetHeight(24) button:SetWidth(170) - local deleteButton = CreateFrame("BUTTON", nil, button) + local deleteButton = CreateFrame("Button", nil, button) deleteButton:SetPoint("RIGHT", button, "RIGHT", -3, 0) deleteButton:SetSize(20, 20) local deleteTex = deleteButton:CreateTexture() diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua index 5db65ad..b321578 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTextureButton.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasTextureButton", 25 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -87,7 +87,7 @@ Constructor local function Constructor() local name = "WeakAurasTextureButton"..AceGUI:GetNextWidgetNum(Type); - local button = CreateFrame("BUTTON", name, UIParent, "OptionsListButtonTemplate"); + local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate"); button:SetHeight(128); button:SetWidth(128); button:SetBackdrop({ diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua index 5f5c42f..5a99a04 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasTwoColumnDropDown.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local Type, Version = "WeakAurasTwoColumnDropdown", 3 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) diff --git a/WeakAurasOptions/ActionOptions.lua b/WeakAurasOptions/ActionOptions.lua index d71efb6..8779964 100644 --- a/WeakAurasOptions/ActionOptions.lua +++ b/WeakAurasOptions/ActionOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/AnimationOptions.lua b/WeakAurasOptions/AnimationOptions.lua index 89806d6..5d4796c 100644 --- a/WeakAurasOptions/AnimationOptions.lua +++ b/WeakAurasOptions/AnimationOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/AuthorOptions.lua b/WeakAurasOptions/AuthorOptions.lua index 11d52fe..301c405 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local WeakAuras = WeakAuras @@ -2001,7 +2001,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] ~= values[i] then + elseif childValues[i][nameSource] ~= values[i] then values[i] = conflictBlue .. L["Entry %i"]:format(i) end i = i + 1 @@ -2418,7 +2418,7 @@ local function mergeOptions(mergedOptions, data, options, config, prepath, paren -- check if nextToMerge.nameSource was merged in the same spot as mergedOption.nameSource local subMergedOption = mergedOption.subOptions[mergedOption.nameSource] local optionData = subMergedOption.references[data.id] - if not optionData or optionData.optionIndex ~= nextToMerge.nameSource then + if not optionData or optionData.index ~= nextToMerge.nameSource then -- either an option was not merged at the name source's index, or the wrong option was. -- in both cases, the name source is conflicted. Fallback to "Entry #" as entry names mergedOption.nameSource = nil diff --git a/WeakAurasOptions/BuffTrigger.lua b/WeakAurasOptions/BuffTrigger.lua index 422e074..70215e9 100644 --- a/WeakAurasOptions/BuffTrigger.lua +++ b/WeakAurasOptions/BuffTrigger.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/BuffTrigger2.lua b/WeakAurasOptions/BuffTrigger2.lua index 21a0e2f..e576353 100644 --- a/WeakAurasOptions/BuffTrigger2.lua +++ b/WeakAurasOptions/BuffTrigger2.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/Cache.lua b/WeakAurasOptions/Cache.lua index ef13e10..fbe94da 100644 --- a/WeakAurasOptions/Cache.lua +++ b/WeakAurasOptions/Cache.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index 15fa934..3196ba4 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/ConditionOptions.lua b/WeakAurasOptions/ConditionOptions.lua index a54964d..596360b 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() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local WeakAuras = WeakAuras; diff --git a/WeakAurasOptions/DisplayOptions.lua b/WeakAurasOptions/DisplayOptions.lua index 8f36c26..19e0149 100644 --- a/WeakAurasOptions/DisplayOptions.lua +++ b/WeakAurasOptions/DisplayOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 cb2463a..0e6bc72 100644 --- a/WeakAurasOptions/ForAllIndentsAndPurposes.lua +++ b/WeakAurasOptions/ForAllIndentsAndPurposes.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 0731789..32b72d3 100644 --- a/WeakAurasOptions/GenericTrigger.lua +++ b/WeakAurasOptions/GenericTrigger.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; diff --git a/WeakAurasOptions/GroupOptions.lua b/WeakAurasOptions/GroupOptions.lua index 7289d45..d45c55c 100644 --- a/WeakAurasOptions/GroupOptions.lua +++ b/WeakAurasOptions/GroupOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/InformationOptions.lua b/WeakAurasOptions/InformationOptions.lua index a3f7656..247332a 100644 --- a/WeakAurasOptions/InformationOptions.lua +++ b/WeakAurasOptions/InformationOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/LoadOptions.lua b/WeakAurasOptions/LoadOptions.lua index 8f1941a..3d52dec 100644 --- a/WeakAurasOptions/LoadOptions.lua +++ b/WeakAurasOptions/LoadOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 1d67876..708bffb 100644 --- a/WeakAurasOptions/Locales/deDE.lua +++ b/WeakAurasOptions/Locales/deDE.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "deDE") then +if GetLocale() ~= "deDE" then return end diff --git a/WeakAurasOptions/Locales/enUS.lua b/WeakAurasOptions/Locales/enUS.lua index bdff1c8..8d00390 100644 --- a/WeakAurasOptions/Locales/enUS.lua +++ b/WeakAurasOptions/Locales/enUS.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local L = WeakAuras.L diff --git a/WeakAurasOptions/Locales/esES.lua b/WeakAurasOptions/Locales/esES.lua index 3009603..d468fd7 100644 --- a/WeakAurasOptions/Locales/esES.lua +++ b/WeakAurasOptions/Locales/esES.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "esES") then +if GetLocale() ~= "esES" then return end diff --git a/WeakAurasOptions/Locales/esMX.lua b/WeakAurasOptions/Locales/esMX.lua index a5feadb..805889c 100644 --- a/WeakAurasOptions/Locales/esMX.lua +++ b/WeakAurasOptions/Locales/esMX.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "esMX") then +if GetLocale() ~= "esMX" then return end diff --git a/WeakAurasOptions/Locales/frFR.lua b/WeakAurasOptions/Locales/frFR.lua index 74e499c..d5abaae 100644 --- a/WeakAurasOptions/Locales/frFR.lua +++ b/WeakAurasOptions/Locales/frFR.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "frFR") then +if GetLocale() ~= "frFR" then return end diff --git a/WeakAurasOptions/Locales/itIT.lua b/WeakAurasOptions/Locales/itIT.lua index 8d4d25b..8ed5bcb 100644 --- a/WeakAurasOptions/Locales/itIT.lua +++ b/WeakAurasOptions/Locales/itIT.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "itIT") then +if GetLocale() ~= "itIT" then return end diff --git a/WeakAurasOptions/Locales/koKR.lua b/WeakAurasOptions/Locales/koKR.lua index 1af8660..ab55e56 100644 --- a/WeakAurasOptions/Locales/koKR.lua +++ b/WeakAurasOptions/Locales/koKR.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "koKR") then +if GetLocale() ~= "koKR" then return end diff --git a/WeakAurasOptions/Locales/ptBR.lua b/WeakAurasOptions/Locales/ptBR.lua index dc28b7d..1221ac9 100644 --- a/WeakAurasOptions/Locales/ptBR.lua +++ b/WeakAurasOptions/Locales/ptBR.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "ptBR") then +if GetLocale() ~= "ptBR" then return end diff --git a/WeakAurasOptions/Locales/ruRU.lua b/WeakAurasOptions/Locales/ruRU.lua index 2a11e18..14dc68f 100644 --- a/WeakAurasOptions/Locales/ruRU.lua +++ b/WeakAurasOptions/Locales/ruRU.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "ruRU") then +if GetLocale() ~= "ruRU" then return end diff --git a/WeakAurasOptions/Locales/zhCN.lua b/WeakAurasOptions/Locales/zhCN.lua index dc6ddcf..f1ba902 100644 --- a/WeakAurasOptions/Locales/zhCN.lua +++ b/WeakAurasOptions/Locales/zhCN.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "zhCN") then +if GetLocale() ~= "zhCN" then return end diff --git a/WeakAurasOptions/Locales/zhTW.lua b/WeakAurasOptions/Locales/zhTW.lua index 3ad44fe..01eaedb 100644 --- a/WeakAurasOptions/Locales/zhTW.lua +++ b/WeakAurasOptions/Locales/zhTW.lua @@ -1,6 +1,6 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end -if not(GetLocale() == "zhTW") then +if GetLocale() ~= "zhTW" then return end diff --git a/WeakAurasOptions/OptionsFrames/CodeReview.lua b/WeakAurasOptions/OptionsFrames/CodeReview.lua index d8a3a13..2f67f7e 100644 --- a/WeakAurasOptions/OptionsFrames/CodeReview.lua +++ b/WeakAurasOptions/OptionsFrames/CodeReview.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/FrameChooser.lua b/WeakAurasOptions/OptionsFrames/FrameChooser.lua index c83ebbf..2281812 100644 --- a/WeakAurasOptions/OptionsFrames/FrameChooser.lua +++ b/WeakAurasOptions/OptionsFrames/FrameChooser.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -21,8 +21,8 @@ local oldFocusName function OptionsPrivate.StartFrameChooser(data, path) local frame = WeakAuras.OptionsFrame(); if not(frameChooserFrame) then - frameChooserFrame = CreateFrame("frame"); - frameChooserBox = CreateFrame("frame", nil, frameChooserFrame); + frameChooserFrame = CreateFrame("Frame"); + frameChooserBox = CreateFrame("Frame", nil, frameChooserFrame); frameChooserBox:SetFrameStrata("TOOLTIP"); frameChooserBox:SetBackdrop({ edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", diff --git a/WeakAurasOptions/OptionsFrames/IconPicker.lua b/WeakAurasOptions/OptionsFrames/IconPicker.lua index d7f7170..0d06f02 100644 --- a/WeakAurasOptions/OptionsFrames/IconPicker.lua +++ b/WeakAurasOptions/OptionsFrames/IconPicker.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/ImportExport.lua b/WeakAurasOptions/OptionsFrames/ImportExport.lua index 319923e..85b5fd1 100644 --- a/WeakAurasOptions/OptionsFrames/ImportExport.lua +++ b/WeakAurasOptions/OptionsFrames/ImportExport.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/ModelPicker.lua b/WeakAurasOptions/OptionsFrames/ModelPicker.lua index 066c744..0df16d8 100644 --- a/WeakAurasOptions/OptionsFrames/ModelPicker.lua +++ b/WeakAurasOptions/OptionsFrames/ModelPicker.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -57,7 +57,7 @@ local function ConstructModelPicker(frame) group.frame:Hide(); group:SetLayout("flow"); - local filterInput = CreateFrame("editbox", "WeakAurasModelFilterInput", group.frame, "WA_InputBoxTemplate") + local filterInput = CreateFrame("EditBox", "WeakAurasModelFilterInput", group.frame, "WA_InputBoxTemplate") filterInput:SetAutoFocus(false) filterInput:SetTextInsets(16, 20, 0, 0) diff --git a/WeakAurasOptions/OptionsFrames/MoverSizer.lua b/WeakAurasOptions/OptionsFrames/MoverSizer.lua index 25e4855..ff2f885 100644 --- a/WeakAurasOptions/OptionsFrames/MoverSizer.lua +++ b/WeakAurasOptions/OptionsFrames/MoverSizer.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -56,11 +56,11 @@ local function ConstructMover(frame) topAndBottom:SetClampedToScreen(true) topAndBottom:SetSize(25, 45) topAndBottom:SetPoint("LEFT", frame, "RIGHT", 1, 0) - local top = CreateFrame("BUTTON", nil, topAndBottom) + local top = CreateFrame("Button", nil, topAndBottom) top:SetSize(25, 25) top:SetPoint("TOP", topAndBottom) top:SetFrameStrata("BACKGROUND") - local bottom = CreateFrame("BUTTON", nil, topAndBottom) + local bottom = CreateFrame("Button", nil, topAndBottom) bottom:SetSize(25, 25) bottom:SetPoint("BOTTOM", topAndBottom) bottom:SetFrameStrata("BACKGROUND") @@ -69,11 +69,11 @@ local function ConstructMover(frame) leftAndRight:SetClampedToScreen(true) leftAndRight:SetSize(45, 25) leftAndRight:SetPoint("TOP", frame, "BOTTOM", 0, 1) - local left = CreateFrame("BUTTON", nil, leftAndRight) + local left = CreateFrame("Button", nil, leftAndRight) left:SetSize(25, 25) left:SetPoint("LEFT", leftAndRight) left:SetFrameStrata("BACKGROUND") - local right = CreateFrame("BUTTON", nil, leftAndRight) + local right = CreateFrame("Button", nil, leftAndRight) right:SetSize(25, 25) right:SetPoint("RIGHT", leftAndRight) right:SetFrameStrata("BACKGROUND") @@ -107,7 +107,7 @@ local function ConstructMover(frame) right:GetPushedTexture():SetRotation(-math.pi/2) right:SetScript("OnClick", function() moveOnePxl("right") end) - local arrow = CreateFrame("frame", nil, frame) + local arrow = CreateFrame("Frame", nil, frame) arrow:SetClampedToScreen(true) arrow:SetSize(196, 196) arrow:SetPoint("CENTER", frame, "CENTER") @@ -146,7 +146,7 @@ end local function ConstructSizer(frame) -- topright, bottomright, bottomleft, topleft - local topright = CreateFrame("FRAME", nil, frame) + local topright = CreateFrame("Frame", nil, frame) topright:EnableMouse() topright:SetWidth(16) topright:SetHeight(16) @@ -178,7 +178,7 @@ local function ConstructSizer(frame) texTR2:Hide() end - local bottomright = CreateFrame("FRAME", nil, frame) + local bottomright = CreateFrame("Frame", nil, frame) bottomright:EnableMouse() bottomright:SetWidth(16) bottomright:SetHeight(16) @@ -210,7 +210,7 @@ local function ConstructSizer(frame) texBR2:Hide() end - local bottomleft = CreateFrame("FRAME", nil, frame) + local bottomleft = CreateFrame("Frame", nil, frame) bottomleft:EnableMouse() bottomleft:SetSize(16, 16) bottomleft:SetHeight(16) @@ -242,7 +242,7 @@ local function ConstructSizer(frame) texBL2:Hide() end - local topleft = CreateFrame("FRAME", nil, frame) + local topleft = CreateFrame("Frame", nil, frame) topleft:EnableMouse() topleft:SetWidth(16) topleft:SetHeight(16) @@ -276,7 +276,7 @@ local function ConstructSizer(frame) -- top, right, bottom, left - local top = CreateFrame("FRAME", nil, frame) + local top = CreateFrame("Frame", nil, frame) top:EnableMouse() top:SetHeight(8) top:SetPoint("TOPRIGHT", topright, "TOPLEFT") @@ -298,7 +298,7 @@ local function ConstructSizer(frame) texT:Hide() end - local right = CreateFrame("FRAME", nil, frame) + local right = CreateFrame("Frame", nil, frame) right:EnableMouse() right:SetWidth(8) right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT") @@ -320,7 +320,7 @@ local function ConstructSizer(frame) texR:Hide() end - local bottom = CreateFrame("FRAME", nil, frame) + local bottom = CreateFrame("Frame", nil, frame) bottom:EnableMouse() bottom:SetHeight(8) bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT") @@ -343,7 +343,7 @@ local function ConstructSizer(frame) texB:Hide() end - local left = CreateFrame("FRAME", nil, frame) + local left = CreateFrame("Frame", nil, frame) left:EnableMouse() left:SetWidth(8) left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT") @@ -417,7 +417,7 @@ local function BuildAlignLines(mover) end local function ConstructMoverSizer(parent) - local frame = CreateFrame("FRAME", nil, parent) + local frame = CreateFrame("Frame", nil, parent) frame:SetBackdrop({ edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border", edgeSize = 12, @@ -439,7 +439,7 @@ local function ConstructMoverSizer(parent) frame.left.Clear() frame.topleft.Clear() - local mover = CreateFrame("FRAME", nil, frame) + local mover = CreateFrame("Frame", nil, frame) mover:RegisterEvent("PLAYER_REGEN_DISABLED") mover:EnableMouse() mover.moving = {} diff --git a/WeakAurasOptions/OptionsFrames/OptionsFrame.lua b/WeakAurasOptions/OptionsFrames/OptionsFrame.lua index 1bb0e19..37dffad 100644 --- a/WeakAurasOptions/OptionsFrames/OptionsFrame.lua +++ b/WeakAurasOptions/OptionsFrames/OptionsFrame.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -44,7 +44,7 @@ local function CreateFrameSizer(frame, callback, position) xOffset2, yOffset2 = -1, -1 end - local handle = CreateFrame("BUTTON", nil, frame) + local handle = CreateFrame("Button", nil, frame) handle:SetPoint(position, frame) handle:SetSize(25, 25) handle:EnableMouse() @@ -88,7 +88,7 @@ local minWidth = 750 local minHeight = 240 function OptionsPrivate.CreateFrame() - CreateFrame("frame", "WeakAuras_DropDownMenu", nil, "UIDropDownMenuTemplate") + CreateFrame("Frame", "WeakAuras_DropDownMenu", nil, "UIDropDownMenuTemplate") local frame local db = OptionsPrivate.savedVars.db local odb = OptionsPrivate.savedVars.odb @@ -367,7 +367,7 @@ function OptionsPrivate.CreateFrame() tipPopupLabel:SetJustifyH("LEFT") tipPopupLabel:SetJustifyV("TOP") - local urlWidget = CreateFrame("EDITBOX", nil, tipPopup, "WA_InputBoxTemplate") + local urlWidget = CreateFrame("EditBox", nil, tipPopup, "WA_InputBoxTemplate") urlWidget:SetFont(STANDARD_TEXT_FONT, 12) urlWidget:SetPoint("TOPLEFT", tipPopupLabel, "BOTTOMLEFT", 6, 0) urlWidget:SetPoint("TOPRIGHT", tipPopupLabel, "BOTTOMRIGHT", 0, 0) @@ -490,7 +490,7 @@ function OptionsPrivate.CreateFrame() frame.moversizer, frame.mover = OptionsPrivate.MoverSizer(frame) -- filter line - local filterInput = CreateFrame("editbox", "WeakAurasFilterInput", frame, "WA_InputBoxTemplate") + local filterInput = CreateFrame("EditBox", "WeakAurasFilterInput", frame, "WA_InputBoxTemplate") filterInput:SetAutoFocus(false) filterInput:SetTextInsets(16, 20, 0, 0) diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 1b340d7..41aa503 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/TexturePicker.lua b/WeakAurasOptions/OptionsFrames/TexturePicker.lua index 4dfad2f..5c7afb4 100644 --- a/WeakAurasOptions/OptionsFrames/TexturePicker.lua +++ b/WeakAurasOptions/OptionsFrames/TexturePicker.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs diff --git a/WeakAurasOptions/OptionsFrames/Update.lua b/WeakAurasOptions/OptionsFrames/Update.lua index c6352a7..f36a709 100644 --- a/WeakAurasOptions/OptionsFrames/Update.lua +++ b/WeakAurasOptions/OptionsFrames/Update.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 99be9f3..76eb233 100644 --- a/WeakAurasOptions/RegionOptions/AuraBar.lua +++ b/WeakAurasOptions/RegionOptions/AuraBar.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -457,7 +457,7 @@ end -- Create preview thumbnail local function createThumbnail() -- Preview frame - local borderframe = CreateFrame("FRAME", nil, UIParent); + local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); @@ -468,13 +468,13 @@ local function createThumbnail() border:SetTexCoord(0.2, 0.8, 0.2, 0.8); -- Main region - local region = CreateFrame("FRAME", nil, borderframe); + local region = CreateFrame("Frame", nil, borderframe); borderframe.region = region; region:SetWidth(32); region:SetHeight(32); -- Status-bar frame - local bar = CreateFrame("FRAME", nil, region); + local bar = CreateFrame("Frame", nil, region); borderframe.bar = bar; -- Fake status-bar diff --git a/WeakAurasOptions/RegionOptions/DynamicGroup.lua b/WeakAurasOptions/RegionOptions/DynamicGroup.lua index 25cbe97..8f5d804 100644 --- a/WeakAurasOptions/RegionOptions/DynamicGroup.lua +++ b/WeakAurasOptions/RegionOptions/DynamicGroup.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L @@ -463,7 +463,7 @@ end local function createThumbnail() -- frame - local thumbnail = CreateFrame("FRAME", nil, UIParent); + local thumbnail = CreateFrame("Frame", nil, UIParent); thumbnail:SetWidth(32); thumbnail:SetHeight(32); @@ -494,7 +494,7 @@ local function defaultIconAnimation(self, elapsed) end local function createAnimatedDefaultIcon(parent) - local defaultIcon = CreateFrame("FRAME", nil, parent); + local defaultIcon = CreateFrame("Frame", nil, parent); parent.defaultIcon = defaultIcon; local t1 = defaultIcon:CreateTexture(nil, "ARTWORK"); diff --git a/WeakAurasOptions/RegionOptions/Group.lua b/WeakAurasOptions/RegionOptions/Group.lua index 38a5374..fa0051e 100644 --- a/WeakAurasOptions/RegionOptions/Group.lua +++ b/WeakAurasOptions/RegionOptions/Group.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; @@ -629,7 +629,7 @@ end local function createThumbnail() -- frame - local thumbnail = CreateFrame("FRAME", nil, UIParent); + local thumbnail = CreateFrame("Frame", nil, UIParent); thumbnail:SetWidth(32); thumbnail:SetHeight(32); @@ -648,7 +648,7 @@ end local function createDefaultIcon(parent) -- default Icon - local defaultIcon = CreateFrame("FRAME", nil, parent); + local defaultIcon = CreateFrame("Frame", nil, parent); parent.defaultIcon = defaultIcon; local t1 = defaultIcon:CreateTexture(nil, "ARTWORK"); diff --git a/WeakAurasOptions/RegionOptions/Icon.lua b/WeakAurasOptions/RegionOptions/Icon.lua index 5bdccac..b278530 100644 --- a/WeakAurasOptions/RegionOptions/Icon.lua +++ b/WeakAurasOptions/RegionOptions/Icon.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local Masque = LibStub("Masque", true) @@ -231,7 +231,7 @@ local function createOptions(id, data) end local function createThumbnail() - local frame = CreateFrame("FRAME", nil, UIParent) + local frame = CreateFrame("Frame", nil, UIParent) local icon = frame:CreateTexture(); icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark"); icon:SetAllPoints(frame) diff --git a/WeakAurasOptions/RegionOptions/Model.lua b/WeakAurasOptions/RegionOptions/Model.lua index 177404f..f3df260 100644 --- a/WeakAurasOptions/RegionOptions/Model.lua +++ b/WeakAurasOptions/RegionOptions/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; @@ -128,7 +128,7 @@ local function createOptions(id, data) end local function createThumbnail() - local borderframe = CreateFrame("FRAME", nil, UIParent); + local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); diff --git a/WeakAurasOptions/RegionOptions/ProgressTexture.lua b/WeakAurasOptions/RegionOptions/ProgressTexture.lua index ea72c81..c1981c7 100644 --- a/WeakAurasOptions/RegionOptions/ProgressTexture.lua +++ b/WeakAurasOptions/RegionOptions/ProgressTexture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L; @@ -401,7 +401,7 @@ local function Transform(tx, x, y, angle, aspect) -- Translates texture to x, y end local function createThumbnail() - local borderframe = CreateFrame("FRAME", nil, UIParent); + local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); @@ -410,7 +410,7 @@ local function createThumbnail() border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp"); border:SetTexCoord(0.2, 0.8, 0.2, 0.8); - local region = CreateFrame("FRAME", nil, borderframe); + local region = CreateFrame("Frame", nil, borderframe); borderframe.region = region; region:SetWidth(32); region:SetHeight(32); diff --git a/WeakAurasOptions/RegionOptions/StopMotion.lua b/WeakAurasOptions/RegionOptions/StopMotion.lua index 4588872..f972dc1 100644 --- a/WeakAurasOptions/RegionOptions/StopMotion.lua +++ b/WeakAurasOptions/RegionOptions/StopMotion.lua @@ -546,7 +546,7 @@ local function createOptions(id, data) end local function createThumbnail() - local borderframe = CreateFrame("FRAME", nil, UIParent); + local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); diff --git a/WeakAurasOptions/RegionOptions/Text.lua b/WeakAurasOptions/RegionOptions/Text.lua index 01372e6..d503512 100644 --- a/WeakAurasOptions/RegionOptions/Text.lua +++ b/WeakAurasOptions/RegionOptions/Text.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); @@ -321,7 +321,7 @@ local function createOptions(id, data) end local function createThumbnail() - local borderframe = CreateFrame("FRAME", nil, UIParent); + local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); diff --git a/WeakAurasOptions/RegionOptions/Texture.lua b/WeakAurasOptions/RegionOptions/Texture.lua index 6eb03a0..715d7a5 100644 --- a/WeakAurasOptions/RegionOptions/Texture.lua +++ b/WeakAurasOptions/RegionOptions/Texture.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L @@ -121,7 +121,7 @@ local function createOptions(id, data) end local function createThumbnail() - local borderframe = CreateFrame("FRAME", nil, UIParent); + local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); diff --git a/WeakAurasOptions/SubRegionOptions/Background.lua b/WeakAurasOptions/SubRegionOptions/Background.lua index e248125..da1f34f 100644 --- a/WeakAurasOptions/SubRegionOptions/Background.lua +++ b/WeakAurasOptions/SubRegionOptions/Background.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or 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 4647a3c..d1783c6 100644 --- a/WeakAurasOptions/SubRegionOptions/Border.lua +++ b/WeakAurasOptions/SubRegionOptions/Border.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAurasOptions/SubRegionOptions/Glow.lua b/WeakAurasOptions/SubRegionOptions/Glow.lua index 1327ecf..d25e890 100644 --- a/WeakAurasOptions/SubRegionOptions/Glow.lua +++ b/WeakAurasOptions/SubRegionOptions/Glow.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAurasOptions/SubRegionOptions/Model.lua b/WeakAurasOptions/SubRegionOptions/Model.lua index 0d3bb75..b267e09 100644 --- a/WeakAurasOptions/SubRegionOptions/Model.lua +++ b/WeakAurasOptions/SubRegionOptions/Model.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua b/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua index 170e41e..24fb49b 100644 --- a/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua +++ b/WeakAurasOptions/SubRegionOptions/SubRegionCommon.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Magic constant diff --git a/WeakAurasOptions/SubRegionOptions/SubText.lua b/WeakAurasOptions/SubRegionOptions/SubText.lua index e50f748..aff9b13 100644 --- a/WeakAurasOptions/SubRegionOptions/SubText.lua +++ b/WeakAurasOptions/SubRegionOptions/SubText.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0") diff --git a/WeakAurasOptions/SubRegionOptions/Tick.lua b/WeakAurasOptions/SubRegionOptions/Tick.lua index 229b69b..b6424aa 100644 --- a/WeakAurasOptions/SubRegionOptions/Tick.lua +++ b/WeakAurasOptions/SubRegionOptions/Tick.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local SharedMedia = LibStub("LibSharedMedia-3.0"); diff --git a/WeakAurasOptions/TriggerOptions.lua b/WeakAurasOptions/TriggerOptions.lua index 1c9cccc..3c90fab 100644 --- a/WeakAurasOptions/TriggerOptions.lua +++ b/WeakAurasOptions/TriggerOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... local L = WeakAuras.L diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua index a8e7c74..75b6167 100644 --- a/WeakAurasOptions/WeakAurasOptions.lua +++ b/WeakAurasOptions/WeakAurasOptions.lua @@ -1,4 +1,4 @@ -if not WeakAuras.IsCorrectVersion() then return end +if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end local AddonName, OptionsPrivate = ... -- Lua APIs @@ -181,7 +181,7 @@ local frame; local db; local odb; local reopenAfterCombat = false; -local loadedFrame = CreateFrame("FRAME"); +local loadedFrame = CreateFrame("Frame"); loadedFrame:RegisterEvent("ADDON_LOADED"); loadedFrame:RegisterEvent("PLAYER_REGEN_ENABLED"); loadedFrame:RegisterEvent("PLAYER_REGEN_DISABLED");