From 13f734038de27cbbaedb91c1ce420b5a633bdf57 Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Wed, 27 Nov 2024 12:09:02 +0100 Subject: [PATCH] Multientry (#7) * from retail * from retail * from retail * from retail * from retail * from retail * remove new threat functions as they are not well implemented for now --- .luacheckrc | 1 + WeakAuras/Conditions.lua | 1 + WeakAuras/GenericTrigger.lua | 198 ++- WeakAuras/Init.lua | 2 +- WeakAuras/Locales/deDE.lua | 32 + WeakAuras/Locales/enUS.lua | 14 + WeakAuras/Locales/esES.lua | 16 + WeakAuras/Locales/esMX.lua | 16 + WeakAuras/Locales/frFR.lua | 30 + WeakAuras/Locales/itIT.lua | 32 + WeakAuras/Locales/koKR.lua | 16 + WeakAuras/Locales/ptBR.lua | 32 + WeakAuras/Locales/ruRU.lua | 26 + WeakAuras/Locales/zhCN.lua | 16 + WeakAuras/Locales/zhTW.lua | 16 + WeakAuras/Media/Textures/spinboxleft.tga | Bin 0 -> 980 bytes WeakAuras/Media/Textures/spinboxlefth.tga | Bin 0 -> 980 bytes WeakAuras/Media/Textures/spinboxleftp.tga | Bin 0 -> 980 bytes WeakAuras/Media/Textures/spinboxoverlay.tga | Bin 0 -> 576 bytes WeakAuras/Media/Textures/spinboxright.tga | Bin 0 -> 980 bytes WeakAuras/Media/Textures/spinboxrighth.tga | Bin 0 -> 980 bytes WeakAuras/Media/Textures/spinboxrightp.tga | Bin 0 -> 980 bytes WeakAuras/Modernize.lua | 174 +++ WeakAuras/Prototypes.lua | 672 +++++++- WeakAuras/Types.lua | 4 + WeakAuras/WeakAuras.lua | 412 +++-- WeakAuras/WeakAuras.toc | 2 +- .../AceGUIWidget-WeakAurasAnchorButtons.lua | 135 ++ .../AceGUIWidget-WeakAurasInputFocus.lua | 43 + ...get-WeakAurasMultiLineEditBoxWithEnter.lua | 379 +++++ .../AceGUIWidget-WeakAurasSortedDropDown.lua | 42 - .../AceGUIWidget-WeakAurasSpinBox.lua | 374 +++++ WeakAurasOptions/ActionOptions.lua | 23 +- WeakAurasOptions/AnimationOptions.lua | 21 + WeakAurasOptions/AuthorOptions.lua | 5 + WeakAurasOptions/BuffTrigger2.lua | 22 +- WeakAurasOptions/Cache.lua | 7 +- WeakAurasOptions/CommonOptions.lua | 194 ++- WeakAurasOptions/ConditionOptions.lua | 13 +- WeakAurasOptions/DisplayOptions.lua | 6 + WeakAurasOptions/GenericTrigger.lua | 10 +- WeakAurasOptions/LoadOptions.lua | 1362 ++++++++++------- WeakAurasOptions/Locales/deDE.lua | 4 + WeakAurasOptions/Locales/esES.lua | 2 + WeakAurasOptions/Locales/esMX.lua | 2 + WeakAurasOptions/Locales/frFR.lua | 4 + WeakAurasOptions/Locales/itIT.lua | 4 + WeakAurasOptions/Locales/koKR.lua | 2 + WeakAurasOptions/Locales/ptBR.lua | 4 + WeakAurasOptions/Locales/ruRU.lua | 2 + WeakAurasOptions/Locales/zhCN.lua | 2 + WeakAurasOptions/Locales/zhTW.lua | 2 + WeakAurasOptions/RegionOptions/AuraBar.lua | 7 + .../RegionOptions/DynamicGroup.lua | 10 + WeakAurasOptions/RegionOptions/Group.lua | 5 + WeakAurasOptions/RegionOptions/Icon.lua | 3 + WeakAurasOptions/RegionOptions/Model.lua | 5 + .../RegionOptions/ProgressTexture.lua | 10 + WeakAurasOptions/RegionOptions/StopMotion.lua | 4 + WeakAurasOptions/RegionOptions/Text.lua | 4 + WeakAurasOptions/RegionOptions/Texture.lua | 3 + WeakAurasOptions/SubRegionOptions/Border.lua | 2 + WeakAurasOptions/SubRegionOptions/Glow.lua | 7 + WeakAurasOptions/SubRegionOptions/Model.lua | 7 + WeakAurasOptions/SubRegionOptions/SubText.lua | 6 + WeakAurasOptions/SubRegionOptions/Tick.lua | 5 + WeakAurasOptions/WeakAurasOptions.toc | 8 +- 67 files changed, 3493 insertions(+), 969 deletions(-) create mode 100644 WeakAuras/Media/Textures/spinboxleft.tga create mode 100644 WeakAuras/Media/Textures/spinboxlefth.tga create mode 100644 WeakAuras/Media/Textures/spinboxleftp.tga create mode 100644 WeakAuras/Media/Textures/spinboxoverlay.tga create mode 100644 WeakAuras/Media/Textures/spinboxright.tga create mode 100644 WeakAuras/Media/Textures/spinboxrighth.tga create mode 100644 WeakAuras/Media/Textures/spinboxrightp.tga create mode 100644 WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua create mode 100644 WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua create mode 100644 WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua delete mode 100644 WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSortedDropDown.lua create mode 100644 WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua diff --git a/.luacheckrc b/.luacheckrc index 4d453a3..8b7b4f2 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -100,6 +100,7 @@ globals = { "WeakAurasArchive", "WeakAurasTooltipImportButtonText", "AceGUIWeakAurasMultiLineEditBoxInsertLink", + "AceGUIWeakAurasMultiLineEditBoxWithEnterInsertLink", -- Third Party Addons/Libs "BigWigs", diff --git a/WeakAuras/Conditions.lua b/WeakAuras/Conditions.lua index f93cef9..9b8b002 100644 --- a/WeakAuras/Conditions.lua +++ b/WeakAuras/Conditions.lua @@ -565,6 +565,7 @@ local globalConditions = ["rangecheck"] = { display = WeakAuras.newFeatureString .. L["Range Check"], type = "range", + control = "WeakAurasSpinBox", events = {"WA_SPELL_RANGECHECK"} }, ["attackabletarget"] = { diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 3041418..c9ab8f4 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -194,52 +194,98 @@ function TestForMultiSelect(trigger, arg) return test; end -function ConstructTest(trigger, arg) +local function singleTest(arg, trigger, name, value, operator, use_exact) + local number = tonumber(value) + if(arg.type == "tristate") then + return TestForTriState(trigger, arg); + elseif(arg.type == "multiselect") then + return TestForMultiSelect(trigger, arg); + elseif(arg.type == "toggle") then + return TestForToggle(trigger, arg); + elseif (arg.type == "spell" or arg.type == "item") then + if arg.test then + if arg.showExactOption then + return "("..arg.test:format(value, tostring(use_exact) or "false") ..")"; + else + return "("..arg.test:format(value)..")"; + end + else + return "(".. name .." and "..name.."==" ..(number or ("\""..(tostring(value) or "").."\""))..")"; + end + elseif(arg.test) then + return "("..arg.test:format(tostring(value) or "")..")"; + elseif(arg.type == "longstring" and operator) then + return TestForLongString(trigger, arg); + elseif (arg.type == "string" or arg.type == "select") then + return "(".. name .." and "..name.."==" ..(number or ("\""..(tostring(value) or "").."\""))..")"; + elseif (arg.type == "number") then + return "(".. name .." and "..name..(operator or "==")..(number or 0) ..")"; + else + -- Should be unused + return "(".. name .." and "..name..(operator or "==")..(number or ("\""..(tostring(value) or 0).."\""))..")"; + end +end + +function ConstructTest(trigger, arg, testGroups, preambleGroups) local test local preamble local name = arg.name; - if(arg.hidden or arg.type == "tristate" or arg.type == "toggle" or (arg.type == "multiselect" and trigger["use_"..name] ~= nil) or ((trigger["use_"..name] or arg.required) and trigger[name])) then - local number = tonumber(trigger[name]); - if(arg.type == "tristate") then - test = TestForTriState(trigger, arg); - elseif(arg.type == "multiselect") then - test = TestForMultiSelect(trigger, arg); - elseif(arg.type == "toggle") then - test = TestForToggle(trigger, arg); - elseif (arg.type == "spell") then - if arg.test then - if arg.showExactOption then - test = "("..arg.test:format(trigger[name], tostring(trigger["use_exact_" .. name]) or "false") ..")"; - else - test = "("..arg.test:format(trigger[name])..")"; - end - else - test = "(".. name .." and "..name.."==" ..(number or "\""..(trigger[name] or "").."\"")..")"; - end - elseif(arg.test) then - test = "("..arg.test:format(tostring(trigger[name]) or "")..")"; - elseif(arg.type == "longstring" and trigger[name.."_operator"]) then - test = TestForLongString(trigger, arg); - elseif (arg.type == "string" or arg.type == "select" or arg.type == "item") and not (type(trigger[name]) == "table") then - test = "(".. name .." and "..name.."==" ..(number or "\""..(trigger[name] or "").."\"")..")"; - else - -- if (type(trigger[name]) == "table") or type(trigger[name.."_operator"]) == "table" then - -- 3.4.0 auras fix - if (type(trigger[name]) == "table") then - trigger[name] = trigger[name][1] or "error"; - end - if (type(trigger[name.."_operator"]) == "table") then - trigger[name.."_operator"] = trigger[name.."_operator"][1] or "error"; - end - test = "(".. name .." and "..name..(trigger[name.."_operator"] or "==")..(number or ("\""..(trigger[name])) or ("".."\""))..")"; + + if arg.preamble then + if not arg.preambleGroup or not preambleGroups[arg.preambleGroup] then + preamble = arg.preamble:format(trigger[name] or "") + end + if arg.preambleGroup then + preambleGroups[arg.preambleGroup] = true end end - if arg.preamble then - preamble = arg.preamble:format(trigger[name] or "") + if arg.hidden + or arg.type == "tristate" + or arg.type == "toggle" + or (arg.type == "multiselect" and trigger["use_"..name] ~= nil) + or ((trigger["use_"..name] or arg.required) and trigger[name]) + then + if arg.multiEntry then + if type(trigger[name]) == "table" and #trigger[name] > 0 then + test = "" + for i, value in ipairs(trigger[name]) do + local operator = name and type(trigger[name.."_operator"]) == "table" and trigger[name.."_operator"][i] + local use_exact = name and type(trigger["use_exact_" .. name]) == "table" and trigger["use_exact_" .. name][i] + + if arg.multiEntry.operator == "preamble" then + preamble = preamble and (preamble .. "\n") or "" + preamble = preamble .. arg.multiEntry.preambleAdd:format(value) + else + local single = singleTest(arg, trigger, name, value, operator, use_exact) + if single then + if test ~= "" then + test = test .. arg.multiEntry.operator + end + test = test .. single + end + end + end + + if arg.multiEntry.operator == "preamble" then + test = arg.test + end + + if test == "" then + test = nil + else + test = "(" .. test .. ")" + end + end + else + local value = trigger[name] + local operator = name and trigger[name.."_operator"] + local use_exact = name and trigger["use_exact_" .. name] + test = singleTest(arg, trigger, name, value, operator, use_exact) + end end - if (test == "(true)") then + if not test or test == "(true)" or arg.testGroup and testGroups[arg.testGroup] then return nil, preamble end @@ -253,9 +299,17 @@ function ConstructFunction(prototype, trigger) local input; if (prototype.statesParameter) then - input = {"state", "event"}; + if prototype.countEvents then + input = {"state", "counter", "event"}; + else + input = {"state", "event"}; + end else - input = {"event"}; + if prototype.countEvents then + input = {"counter", "event"}; + else + input = {"event"}; + end end local required = {}; @@ -264,6 +318,9 @@ function ConstructFunction(prototype, trigger) local store = {}; local init; local preambles = "\n" + local orConjunctionGroups = {} + local preambleGroups = {} + local testGroups = {} if(prototype.init) then init = prototype.init(trigger); else @@ -289,12 +346,17 @@ function ConstructFunction(prototype, trigger) if (arg.store) then tinsert(store, name); end - local test, preamble = ConstructTest(trigger, arg); + local test, preamble = ConstructTest(trigger, arg, testGroups, preambleGroups); if (test) then if(arg.required) then tinsert(required, test); else - tinsert(tests, test); + if arg.orConjunctionGroup then + orConjunctionGroups[arg.orConjunctionGroup] = orConjunctionGroups[arg.orConjunctionGroup] or {} + tinsert(orConjunctionGroups[arg.orConjunctionGroup], test) + else + tinsert(tests, test); + end end if(arg.debug) then tinsert(debug, arg.debug:format(trigger[name])); @@ -306,34 +368,51 @@ function ConstructFunction(prototype, trigger) end end end - local ret = preambles .. "return function("..tconcat(input, ", ")..")\n"; - ret = ret..(init or ""); - ret = ret..(#debug > 0 and tconcat(debug, "\n") or ""); + for _, orConjunctionGroup in pairs(orConjunctionGroups) do + tinsert(tests, "("..table.concat(orConjunctionGroup, " or ")..")") + end - ret = ret.."if("; - ret = ret..((#required > 0) and tconcat(required, " and ").." and " or ""); - ret = ret..(#tests > 0 and tconcat(tests, " and ") or "true"); - ret = ret..") then\n"; + local ret = {preambles .. "return function("..tconcat(input, ", ")..")\n"} + if init then + table.insert(ret, init) + end + if #debug > 0 then + table.insert(ret, tconcat(debug, "\n") or "") + end + + table.insert(ret, "if("..((#required > 0) and tconcat(required, " and ").." and " or "")) + table.insert(ret, #tests > 0 and tconcat(tests, " and ") or "true") + table.insert(ret, ") then\n") if(#debug > 0) then - ret = ret.."print('ret: true');\n"; + table.insert(ret, "print('ret: true');\n") end if (prototype.statesParameter == "all") then - ret = ret .. " state[cloneId] = state[cloneId] or {}\n" - ret = ret .. " state = state[cloneId]\n" - ret = ret .. " state.changed = true\n" + table.insert(ret, " state[cloneId] = state[cloneId] or {}\n") + table.insert(ret, " state = state[cloneId]\n") + table.insert(ret, " state.changed = true\n") + end + + if prototype.countEvents then + table.insert(ret, " local count = counter:GetNext()\n") + if trigger.use_count and type(trigger.count) == "string" and trigger.count ~= "" then + table.insert(ret, " local match = counter:Match()") + table.insert(ret, " if not match then return false end\n") + end + table.insert(ret, " state.count = count\n") + table.insert(ret, " state.changed = true\n") end for _, v in ipairs(store) do - ret = ret .. " if (state." .. v .. " ~= " .. v .. ") then\n" - ret = ret .. " state." .. v .. " = " .. v .. "\n" - ret = ret .. " state.changed = true\n" - ret = ret .. " end\n" + table.insert(ret, " if (state." .. v .. " ~= " .. v .. ") then\n") + table.insert(ret, " state." .. v .. " = " .. v .. "\n") + table.insert(ret, " state.changed = true\n") + table.insert(ret, " end\n") end - ret = ret.."return true else return false end end"; + table.insert(ret, "return true else return false end end") - return ret; + return table.concat(ret); end function Private.EndEvent(id, triggernum, force, state) @@ -921,6 +1000,7 @@ function HandleEvent(frame, event, arg1, arg2, ...) timer:ScheduleTimer(function() Private.StartProfileSystem("generictrigger WA_DELAYED_PLAYER_ENTERING_WORLD"); HandleEvent(frame, "WA_DELAYED_PLAYER_ENTERING_WORLD"); + Private.ScanForLoads(nil, "WA_DELAYED_PLAYER_ENTERING_WORLD") Private.CheckCooldownReady(); Private.StopProfileSystem("generictrigger WA_DELAYED_PLAYER_ENTERING_WORLD"); Private.PreShowModels() diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index d2fd8c8..aff88c2 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -8,7 +8,7 @@ WeakAuras.halfWidth = WeakAuras.normalWidth / 2 WeakAuras.doubleWidth = WeakAuras.normalWidth * 2 local versionStringFromToc = GetAddOnMetadata("WeakAuras", "Version") -local versionString = "4.1.0" +local versionString = "4.1.1" local buildTime = "20240701180000" local isAwesomeEnabled = C_NamePlate and C_NamePlate.GetNamePlateForUnit or false diff --git a/WeakAuras/Locales/deDE.lua b/WeakAuras/Locales/deDE.lua index 657a5d4..bc44d09 100644 --- a/WeakAuras/Locales/deDE.lua +++ b/WeakAuras/Locales/deDE.lua @@ -258,6 +258,8 @@ L["Buru the Gorger"] = "Buru the Gorger" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "Kann genutzt werden um z.B zu checken ob \"Ziel\" dieselbe Einheit ist wie \"Spieler\"" L["Cancel"] = "Abbrechen" --[[Translation missing --]] +L["Case Insensitive"] = "Case Insensitive" +--[[Translation missing --]] L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer." L["Cast"] = "Zauberwirken" L["Cast Bar"] = "Zauberleiste" @@ -367,6 +369,8 @@ L["Debuff Class"] = "Debuff Class" L["Debuff Class Icon"] = "Debuff Class Icon" --[[Translation missing --]] L["Debuff Type"] = "Debuff Type" +--[[Translation missing --]] +L["Defensive Stats"] = "Defensive Stats" L["Deflect"] = "Umlenken" L["Desaturate"] = "Entsättigen" L["Desaturate Background"] = "Hintergrund entsättigen" @@ -378,6 +382,8 @@ L["Dest Raid Mark"] = "Zielmarkierung" L["Destination Affiliation"] = "Destination Affiliation" --[[Translation missing --]] L["Destination GUID"] = "Destination GUID" +--[[Translation missing --]] +L["Destination Info"] = "Destination Info" L["Destination Name"] = "Zielname" --[[Translation missing --]] L["Destination NPC Id"] = "Destination NPC Id" @@ -458,6 +464,8 @@ L["Entering/Leaving Combat"] = "Kampf Betreten/Verlassen" L["Entry Order"] = "Entry Order" L["Environment Type"] = "Umgebungstyp" L["Environmental"] = "Umgebung (ENVIRONMENTAL)" +--[[Translation missing --]] +L["Equipment"] = "Equipment" L["Equipment Set"] = "Ausrüstungsset" L["Equipment Set Equipped"] = "Angelegtes Ausrüstungsset" L["Equipment Slot"] = "Ausrüstungsplatz" @@ -561,6 +569,8 @@ L["Garr"] = "Garr" --[[Translation missing --]] L["Gehennas"] = "Gehennas" --[[Translation missing --]] +L["General"] = "General" +--[[Translation missing --]] L["General Rajaxx"] = "General Rajaxx" L["Glancing"] = "Gestreift (GLANCING)" L["Global Cooldown"] = "Globale Abklingzeit" @@ -663,6 +673,8 @@ L["Instakill"] = "Sofortiger Tod (INSTAKILL)" L["Instance"] = "Instanz" L["Instance Difficulty"] = "Instanzschwierigkeit" --[[Translation missing --]] +L["Instance Info"] = "Instance Info" +--[[Translation missing --]] L["Instance Size Type"] = "Instance Size Type" L["Instance Type"] = "Instanztyp" --[[Translation missing --]] @@ -805,6 +817,10 @@ L["Matches (Pattern)"] = "Abgleichen (Muster)" L["Max Char "] = "Max Char " --[[Translation missing --]] L["Max Charges"] = "Max Charges" +--[[Translation missing --]] +L["Max Health"] = "Max Health" +--[[Translation missing --]] +L["Max Power"] = "Max Power" L["Maximum"] = "Maximum" --[[Translation missing --]] L["Maximum Estimate"] = "Maximum Estimate" @@ -823,6 +839,8 @@ L["Minimum Estimate"] = "Minimum Estimate" --[[Translation missing --]] L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" L["Mirror"] = "Spiegel" +--[[Translation missing --]] +L["Miscellaneous"] = "Miscellaneous" L["Miss"] = "Verfehlen" L["Miss Type"] = "Verfehlengrund" L["Missed"] = "Verfehlt (MISSED)" @@ -1017,6 +1035,8 @@ L["Power Type"] = "Ressourcentyp" L["Precision"] = "Precision" L["Preset"] = "Standard" --[[Translation missing --]] +L["Primary Stats"] = "Primary Stats" +--[[Translation missing --]] L["Princess Huhuran"] = "Princess Huhuran" --[[Translation missing --]] L["Print Profiling Results"] = "Print Profiling Results" @@ -1100,6 +1120,8 @@ L["Requested display not authorized"] = "Angeforderte Anzeige ist nicht autorisi L["Requesting display information from %s ..."] = "Requesting display information from %s ..." L["Require Valid Target"] = "Erfordert gültiges Ziel" L["Resist"] = "Widerstehen" +--[[Translation missing --]] +L["Resistances"] = "Resistances" L["Resisted"] = "Widerstanden (RESISTED)" L["Resolve collisions dialog"] = [=[ Ein aktiviertes externes Addon definiert |cFF8800FFWeakAuras|r-Anzeigen, die den selben Namen besitzen wie bereits existierende Anzeigen. @@ -1171,6 +1193,8 @@ L["Screen/Parent Group"] = "Bildschirm/Elterngruppe" L["Second"] = "Second" --[[Translation missing --]] L["Second Value of Tooltip Text"] = "Second Value of Tooltip Text" +--[[Translation missing --]] +L["Secondary Stats"] = "Secondary Stats" L["Seconds"] = "Sekunden" L["Select Frame"] = "Frame auswählen" --[[Translation missing --]] @@ -1240,6 +1264,8 @@ L["Source"] = "Source" L["Source Affiliation"] = "Source Affiliation" --[[Translation missing --]] L["Source GUID"] = "Source GUID" +--[[Translation missing --]] +L["Source Info"] = "Source Info" L["Source Name"] = "Quellname" --[[Translation missing --]] L["Source NPC Id"] = "Source NPC Id" @@ -1261,6 +1287,8 @@ L["Spark"] = "Spark" L["Spec Role"] = "Spec Role" --[[Translation missing --]] L["Specific Type"] = "Specific Type" +--[[Translation missing --]] +L["Specific Currency ID"] = "Specific Currency ID" L["Specific Unit"] = "Konkrete Einheit" L["Spell"] = "Zauber" L["Spell (Building)"] = "Zauber, Gebäude (SPELL_BUILDING)" @@ -1302,6 +1330,8 @@ L["Strength"] = "Stärke" --[[Translation missing --]] L["String"] = "String" --[[Translation missing --]] +L["Subevent Info"] = "Subevent Info" +--[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] L["Subtract Channel"] = "Subtract Channel" @@ -1342,6 +1372,8 @@ L["Tanking And Highest"] = "Höchster und Aggro" L["Tanking But Not Highest"] = "Aggro aber nicht höchste" L["Target"] = "Ziel" L["Targeted"] = "Anvisiert" +--[[Translation missing --]] +L["Tertiary Stats"] = "Tertiary Stats" L["Text"] = "Text" --[[Translation missing --]] L["Thaddius"] = "Thaddius" diff --git a/WeakAuras/Locales/enUS.lua b/WeakAuras/Locales/enUS.lua index e7bd239..a04c5c1 100644 --- a/WeakAuras/Locales/enUS.lua +++ b/WeakAuras/Locales/enUS.lua @@ -277,6 +277,7 @@ L["Debuff"] = "Debuff" L["Debuff Class"] = "Debuff Class" L["Debuff Class Icon"] = "Debuff Class Icon" L["Debuff Type"] = "Debuff Type" +L["Defensive Stats"] = "Defensive Stats" L["Deflect"] = "Deflect" L["Desaturate"] = "Desaturate" L["Desaturate Background"] = "Desaturate Background" @@ -286,6 +287,7 @@ L["Description"] = "Description" L["Dest Raid Mark"] = "Dest Raid Mark" L["Destination Affiliation"] = "Destination Affiliation" L["Destination GUID"] = "Destination GUID" +L["Destination Info"] = "Destination Info" L["Destination Name"] = "Destination Name" L["Destination NPC Id"] = "Destination NPC Id" L["Destination Object Type"] = "Destination Object Type" @@ -340,6 +342,7 @@ L["Entering/Leaving Combat"] = "Entering/Leaving Combat" L["Entry Order"] = "Entry Order" L["Environment Type"] = "Environment Type" L["Environmental"] = "Environmental" +L["Equipment"] = "Equipment" L["Equipment Set"] = "Equipment Set" L["Equipment Set Equipped"] = "Equipment Set Equipped" L["Equipment Slot"] = "Equipment Slot" @@ -409,6 +412,7 @@ L["Gahz'ranka"] = "Gahz'ranka" L["Gained"] = "Gained" L["Garr"] = "Garr" L["Gehennas"] = "Gehennas" +L["General"] = "General" L["General Rajaxx"] = "General Rajaxx" L["Glancing"] = "Glancing" L["Global Cooldown"] = "Global Cooldown" @@ -485,6 +489,7 @@ L["Inherited"] = "Inherited" L["Instakill"] = "Instakill" L["Instance"] = "Instance" L["Instance Difficulty"] = "Instance Difficulty" +L["Instance Info"] = "Instance Info" L["Instance Size Type"] = "Instance Size Type" L["Instance Type"] = "Instance Type" L["Instructor Razuvious"] = "Instructor Razuvious" @@ -575,6 +580,8 @@ L["Match Count per Unit"] = "Match Count per Unit" L["Matches (Pattern)"] = "Matches (Pattern)" L["Max Char "] = "Max Char " L["Max Charges"] = "Max Charges" +L["Max Health"] = "Max Health" +L["Max Power"] = "Max Power" L["Maximum"] = "Maximum" L["Maximum Estimate"] = "Maximum Estimate" L["Medium"] = "Medium" @@ -587,6 +594,7 @@ L["Minimum"] = "Minimum" L["Minimum Estimate"] = "Minimum Estimate" L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" L["Mirror"] = "Mirror" +L["Miscellaneous"] = "Miscellaneous" L["Miss"] = "Miss" L["Miss Type"] = "Miss Type" L["Missed"] = "Missed" @@ -720,6 +728,7 @@ L["Power (%)"] = "Power (%)" L["Power Type"] = "Power Type" L["Precision"] = "Precision" L["Preset"] = "Preset" +L["Primary Stats"] = "Primary Stats" L["Princess Huhuran"] = "Princess Huhuran" L["Print Profiling Results"] = "Print Profiling Results" L["Profiling already started."] = "Profiling already started." @@ -775,6 +784,7 @@ L["Requested display not authorized"] = "Requested display not authorized" L["Requesting display information from %s ..."] = "Requesting display information from %s ..." L["Require Valid Target"] = "Require Valid Target" L["Resist"] = "Resist" +L["Resistances"] = "Resistances" L["Resisted"] = "Resisted" L["Resolve collisions dialog"] = "Resolve collisions dialog" L["Resolve collisions dialog singular"] = "Resolve collisions dialog singular" @@ -814,6 +824,7 @@ L["Scenario (Normal)"] = "Scenario (Normal)" L["Screen/Parent Group"] = "Screen/Parent Group" L["Second"] = "Second" L["Second Value of Tooltip Text"] = "Second Value of Tooltip Text" +L["Secondary Stats"] = "Secondary Stats" L["Seconds"] = "Seconds" L["Select Frame"] = "Select Frame" L["Separator"] = "Separator" @@ -861,6 +872,7 @@ L["Sound by Kit ID"] = "Sound by Kit ID" L["Source"] = "Source" L["Source Affiliation"] = "Source Affiliation" L["Source GUID"] = "Source GUID" +L["Source Info"] = "Source Info" L["Source Name"] = "Source Name" L["Source NPC Id"] = "Source NPC Id" L["Source Object Type"] = "Source Object Type" @@ -905,6 +917,7 @@ L["Stolen"] = "Stolen" L["Stop"] = "Stop" L["Strength"] = "Strength" L["String"] = "String" +L["Subevent Info"] = "Subevent Info" L["Subtract Cast"] = "Subtract Cast" L["Subtract Channel"] = "Subtract Channel" L["Subtract GCD"] = "Subtract GCD" @@ -932,6 +945,7 @@ L["Tanking And Highest"] = "Tanking And Highest" L["Tanking But Not Highest"] = "Tanking But Not Highest" L["Target"] = "Target" L["Targeted"] = "Targeted" +L["Tertiary Stats"] = "Tertiary Stats" L["Text"] = "Text" L["Thaddius"] = "Thaddius" L["The aura has overwritten the global '%s', this might affect other auras."] = "The aura has overwritten the global '%s', this might affect other auras." diff --git a/WeakAuras/Locales/esES.lua b/WeakAuras/Locales/esES.lua index d381e94..07a2afd 100644 --- a/WeakAuras/Locales/esES.lua +++ b/WeakAuras/Locales/esES.lua @@ -252,6 +252,7 @@ L["Buru the Gorger"] = "Buru the Gorger" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "Can be used for e.g. checking if \"boss1target\" is the same as \"player\"." --[[Translation missing --]] L["Cancel"] = "Cancel" +L["Case Insensitive"] = "Insensible a mayúsculas/minúsculas" --[[Translation missing --]] L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer." L["Cast"] = "Lanzar Hechizo" @@ -377,6 +378,7 @@ L["Debuff"] = "Perjuicio" L["Debuff Class"] = "Clase del perjuicio" L["Debuff Class Icon"] = "Icono de clase del perjuicio" L["Debuff Type"] = "Tipo de Perjuicio" +L["Defensive Stats"] = "Estadísticas defensivas" L["Deflect"] = "Desviar" --[[Translation missing --]] L["Desaturate"] = "Desaturate" @@ -393,6 +395,7 @@ L["Dest Raid Mark"] = "Dest Raid Mark" L["Destination Affiliation"] = "Destination Affiliation" --[[Translation missing --]] L["Destination GUID"] = "Destination GUID" +L["Destination Info"] = "Info del destino" L["Destination Name"] = "Nombre del Destino" --[[Translation missing --]] L["Destination NPC Id"] = "Destination NPC Id" @@ -485,6 +488,7 @@ L["Entering/Leaving Combat"] = "Entering/Leaving Combat" L["Entry Order"] = "Entry Order" L["Environment Type"] = "Tipo de Entorno" L["Environmental"] = "Ambiental" +L["Equipment"] = "Equipo" --[[Translation missing --]] L["Equipment Set"] = "Equipment Set" --[[Translation missing --]] @@ -602,6 +606,7 @@ L["Gained"] = "Obtenido" L["Garr"] = "Garr" --[[Translation missing --]] L["Gehennas"] = "Gehennas" +L["General"] = "General" --[[Translation missing --]] L["General Rajaxx"] = "General Rajaxx" L["Glancing"] = "de refilón" @@ -724,6 +729,7 @@ L["Instakill"] = "Muerte Instantanea" L["Instance"] = "Instance" --[[Translation missing --]] L["Instance Difficulty"] = "Instance Difficulty" +L["Instance Info"] = "Info de estancia" --[[Translation missing --]] L["Instance Size Type"] = "Instance Size Type" L["Instance Type"] = "Tipo de Instancia" @@ -884,6 +890,8 @@ L["Matches (Pattern)"] = "Corresponde (Patrón)" L["Max Char "] = "Max Char " --[[Translation missing --]] L["Max Charges"] = "Max Charges" +L["Max Health"] = "Salud máx." +L["Max Power"] = "Poder máx." --[[Translation missing --]] L["Maximum"] = "Maximum" --[[Translation missing --]] @@ -905,6 +913,7 @@ L["Minimum Estimate"] = "Minimum Estimate" L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" --[[Translation missing --]] L["Mirror"] = "Mirror" +L["Miscellaneous"] = "Misceláneos" L["Miss"] = "Fallo" L["Miss Type"] = "Tipo de Fallo" L["Missed"] = "Fallado" @@ -1121,6 +1130,7 @@ L["Power Type"] = "Tipo de Poder" --[[Translation missing --]] L["Precision"] = "Precision" L["Preset"] = "Predefinido" +L["Primary Stats"] = "Estadísticas primarias" --[[Translation missing --]] L["Princess Huhuran"] = "Princess Huhuran" --[[Translation missing --]] @@ -1216,6 +1226,7 @@ L["Requested display not authorized"] = "El aura requerida no está autorizada" L["Requesting display information from %s ..."] = "Requesting display information from %s ..." L["Require Valid Target"] = "Requiere Objetivo Válido" L["Resist"] = "Resistir" +L["Resistances"] = "Resistencias" L["Resisted"] = "Resistido" L["Resolve collisions dialog"] = "Resolver colisiones en dialogos" L["Resolve collisions dialog singular"] = "Resolver colisiones en dialogos singulares" @@ -1281,6 +1292,7 @@ L["Screen/Parent Group"] = "Screen/Parent Group" L["Second"] = "Second" --[[Translation missing --]] L["Second Value of Tooltip Text"] = "Second Value of Tooltip Text" +L["Secondary Stats"] = "Estadísticas secundarias" L["Seconds"] = "Segundos" --[[Translation missing --]] L["Select Frame"] = "Select Frame" @@ -1363,6 +1375,7 @@ L["Source"] = "Source" L["Source Affiliation"] = "Source Affiliation" --[[Translation missing --]] L["Source GUID"] = "Source GUID" +L["Source Info"] = "Info de la fuente" L["Source Name"] = "Nombre de Origen" --[[Translation missing --]] L["Source NPC Id"] = "Source NPC Id" @@ -1384,6 +1397,7 @@ L["Spacing"] = "Espaciado" L["Spark"] = "Spark" --[[Translation missing --]] L["Spec Role"] = "Spec Role" +L["Specific Currency ID"] = "ID de moneda específica" --[[Translation missing --]] L["Specific Type"] = "Specific Type" L["Specific Unit"] = "Unidad Específica" @@ -1437,6 +1451,7 @@ L["Stop"] = "Stop" L["Strength"] = "Strength" --[[Translation missing --]] L["String"] = "String" +L["Subevent Info"] = "Info de subevento" --[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] @@ -1480,6 +1495,7 @@ L["Tanking But Not Highest"] = "Tanqueando pero no el mas alto" L["Target"] = "Objetivo" --[[Translation missing --]] L["Targeted"] = "Targeted" +L["Tertiary Stats"] = "Estadísticas terciarias" --[[Translation missing --]] L["Text"] = "Text" --[[Translation missing --]] diff --git a/WeakAuras/Locales/esMX.lua b/WeakAuras/Locales/esMX.lua index 83c5ea9..0612c6a 100644 --- a/WeakAuras/Locales/esMX.lua +++ b/WeakAuras/Locales/esMX.lua @@ -252,6 +252,7 @@ L["Buru the Gorger"] = "Buru the Gorger" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "Can be used for e.g. checking if \"boss1target\" is the same as \"player\"." --[[Translation missing --]] L["Cancel"] = "Cancel" +L["Case Insensitive"] = "Insensible a mayúsculas/minúsculas" --[[Translation missing --]] L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer." L["Cast"] = "Lanzar hechizo" @@ -372,6 +373,7 @@ L["Debuff Class"] = "Debuff Class" L["Debuff Class Icon"] = "Debuff Class Icon" --[[Translation missing --]] L["Debuff Type"] = "Debuff Type" +L["Defensive Stats"] = "Estadísticas defensivas" L["Deflect"] = "Desviar" L["Desaturate"] = "Desaturar" L["Desaturate Background"] = "Desaturar fondo" @@ -385,6 +387,7 @@ L["Dest Raid Mark"] = "Dest Raid Mark" L["Destination Affiliation"] = "Destination Affiliation" --[[Translation missing --]] L["Destination GUID"] = "Destination GUID" +L["Destination Info"] = "Info del destino" L["Destination Name"] = "Nombre de destino" --[[Translation missing --]] L["Destination NPC Id"] = "Destination NPC Id" @@ -474,6 +477,7 @@ L["Entering/Leaving Combat"] = "Entrando/abandonando batalla" L["Entry Order"] = "Entry Order" L["Environment Type"] = "Tipo de entorno" L["Environmental"] = "Ambiental" +L["Equipment"] = "Equipo" L["Equipment Set"] = "Equipamiento" --[[Translation missing --]] L["Equipment Set Equipped"] = "Equipment Set Equipped" @@ -584,6 +588,7 @@ L["Gained"] = "Obtenido" L["Garr"] = "Garr" --[[Translation missing --]] L["Gehennas"] = "Gehennas" +L["General"] = "General" --[[Translation missing --]] L["General Rajaxx"] = "General Rajaxx" L["Glancing"] = "Observar de refilón" @@ -701,6 +706,7 @@ L["Instakill"] = "Muerte instantánea " L["Instance"] = "Instancia" --[[Translation missing --]] L["Instance Difficulty"] = "Instance Difficulty" +L["Instance Info"] = "Info de estancia" --[[Translation missing --]] L["Instance Size Type"] = "Instance Size Type" L["Instance Type"] = "Tipo de instancia" @@ -853,6 +859,8 @@ L["Matches (Pattern)"] = "Coincidencias (Patrones)" L["Max Char "] = "Max Char " --[[Translation missing --]] L["Max Charges"] = "Max Charges" +L["Max Health"] = "Salud máx." +L["Max Power"] = "Poder máx." --[[Translation missing --]] L["Maximum"] = "Maximum" --[[Translation missing --]] @@ -874,6 +882,7 @@ L["Minimum Estimate"] = "Minimum Estimate" L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" --[[Translation missing --]] L["Mirror"] = "Mirror" +L["Miscellaneous"] = "Misceláneos" L["Miss"] = "Fallo" L["Miss Type"] = "Tipo de fallo" L["Missed"] = "Fallado" @@ -1081,6 +1090,7 @@ L["Power Type"] = "Tipo de poder" --[[Translation missing --]] L["Precision"] = "Precision" L["Preset"] = "Predefinido" +L["Primary Stats"] = "Estadísticas primarias" --[[Translation missing --]] L["Princess Huhuran"] = "Princess Huhuran" --[[Translation missing --]] @@ -1170,6 +1180,7 @@ L["Requested display not authorized"] = "El aura requerida no está autorizada" L["Requesting display information from %s ..."] = "Requesting display information from %s ..." L["Require Valid Target"] = "Requiere un objetivo válido" L["Resist"] = "Resistir" +L["Resistances"] = "Resistencias" L["Resisted"] = "Resistido" L["Resolve collisions dialog"] = "Resolver colisiones en diálogos" L["Resolve collisions dialog singular"] = "Resolver colisiones en diálogos singulares" @@ -1226,6 +1237,7 @@ L["Screen/Parent Group"] = "Pantalla/Grupo primario" L["Second"] = "Second" --[[Translation missing --]] L["Second Value of Tooltip Text"] = "Second Value of Tooltip Text" +L["Secondary Stats"] = "Estadísticas secundarias" L["Seconds"] = "Segundos" L["Select Frame"] = "Seleccionar macro" --[[Translation missing --]] @@ -1304,6 +1316,7 @@ L["Source"] = "Source" L["Source Affiliation"] = "Source Affiliation" --[[Translation missing --]] L["Source GUID"] = "Source GUID" +L["Source Info"] = "Info de la fuente" L["Source Name"] = "Nombre de origen" --[[Translation missing --]] L["Source NPC Id"] = "Source NPC Id" @@ -1325,6 +1338,7 @@ L["Spacing"] = "Espaciar" L["Spark"] = "Spark" --[[Translation missing --]] L["Spec Role"] = "Spec Role" +L["Specific Currency ID"] = "ID de moneda específica" --[[Translation missing --]] L["Specific Type"] = "Specific Type" L["Specific Unit"] = "Unidad específica" @@ -1374,6 +1388,7 @@ L["Stop"] = "Stop" L["Strength"] = "Strength" --[[Translation missing --]] L["String"] = "String" +L["Subevent Info"] = "Info de subevento" --[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] @@ -1416,6 +1431,7 @@ L["Tanking But Not Highest"] = "Tanqueando - No el más alto" L["Target"] = "Objetivo" --[[Translation missing --]] L["Targeted"] = "Targeted" +L["Tertiary Stats"] = "Estadísticas terciarias" --[[Translation missing --]] L["Text"] = "Text" L["Thaddius"] = "Thaddius" diff --git a/WeakAuras/Locales/frFR.lua b/WeakAuras/Locales/frFR.lua index f8c45bd..b81903b 100644 --- a/WeakAuras/Locales/frFR.lua +++ b/WeakAuras/Locales/frFR.lua @@ -233,6 +233,8 @@ L["Buru the Gorger"] = "Buru the Gorger" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "Peut être utilisé pour par exemple vérifier si l'unité \"boss1target\" est la même que \"player\"." L["Cancel"] = "Annuler" --[[Translation missing --]] +L["Case Insensitive"] = "Case Insensitive" +--[[Translation missing --]] L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer." L["Cast"] = "Incantation" L["Cast Bar"] = "Barre d'incantation" @@ -336,6 +338,8 @@ L["Debuff Class"] = "Debuff Class" L["Debuff Class Icon"] = "Debuff Class Icon" --[[Translation missing --]] L["Debuff Type"] = "Debuff Type" +--[[Translation missing --]] +L["Defensive Stats"] = "Defensive Stats" L["Deflect"] = "Déviation" L["Desaturate"] = "Désaturer" L["Desaturate Background"] = "Désaturer l'Arrière-plan" @@ -347,6 +351,8 @@ L["Dest Raid Mark"] = "Marqueurs de Raid" L["Destination Affiliation"] = "Destination Affiliation" --[[Translation missing --]] L["Destination GUID"] = "Destination GUID" +--[[Translation missing --]] +L["Destination Info"] = "Destination Info" L["Destination Name"] = "Nom de destination" --[[Translation missing --]] L["Destination NPC Id"] = "Destination NPC Id" @@ -424,6 +430,7 @@ L["Entering/Leaving Combat"] = "Entrer/Sortir de Combat" L["Entry Order"] = "Entry Order" L["Environment Type"] = "Type d'environnement" L["Environmental"] = "Environnement" +L["Equipment"] = "Équipement" L["Equipment Set"] = "Ensemble d'Equipement" L["Equipment Set Equipped"] = "Ensemble d'Equipement Équipé" L["Equipment Slot"] = "Emplacement d'équipement" @@ -520,6 +527,8 @@ L["Garr"] = "Garr" --[[Translation missing --]] L["Gehennas"] = "Gehennas" --[[Translation missing --]] +L["General"] = "General" +--[[Translation missing --]] L["General Rajaxx"] = "General Rajaxx" L["Glancing"] = "Erafle" L["Global Cooldown"] = "Temps de recharge global" @@ -618,6 +627,8 @@ L["Instakill"] = "Mort instant." L["Instance"] = "Instance" L["Instance Difficulty"] = "Difficulté de l'Instance" --[[Translation missing --]] +L["Instance Info"] = "Instance Info" +--[[Translation missing --]] L["Instance Size Type"] = "Instance Size Type" L["Instance Type"] = "Type d'instance" --[[Translation missing --]] @@ -743,6 +754,10 @@ L["Matches (Pattern)"] = "Correspond (format)" --[[Translation missing --]] L["Max Char "] = "Max Char " L["Max Charges"] = "Charges Max" +--[[Translation missing --]] +L["Max Health"] = "Max Health" +--[[Translation missing --]] +L["Max Power"] = "Max Power" L["Maximum"] = "Maximum" L["Maximum Estimate"] = "Estimation Maximale" L["Medium"] = "Moyen" @@ -757,6 +772,8 @@ L["Minimum Estimate"] = "Estimation minimale" --[[Translation missing --]] L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" L["Mirror"] = "Miroir" +--[[Translation missing --]] +L["Miscellaneous"] = "Miscellaneous" L["Miss"] = "Raté" L["Miss Type"] = "Type de raté" L["Missed"] = "Raté" @@ -937,6 +954,8 @@ L["Power Type"] = "Type de puissance" L["Precision"] = "Précision" L["Preset"] = "Préréglé" --[[Translation missing --]] +L["Primary Stats"] = "Primary Stats" +--[[Translation missing --]] L["Princess Huhuran"] = "Princess Huhuran" --[[Translation missing --]] L["Print Profiling Results"] = "Print Profiling Results" @@ -1011,6 +1030,8 @@ L["Requested display not authorized"] = "L'affichage demandé n'est pas autoris L["Requesting display information from %s ..."] = "Demande des informations de l'affichage depuis %s ..." L["Require Valid Target"] = "Nécessite une cible valide" L["Resist"] = "Résiste" +--[[Translation missing --]] +L["Resistances"] = "Resistances" L["Resisted"] = "Résisté" L["Resolve collisions dialog"] = [=[ Vous avez activé un addon qui crée des graphiques |cFF8800FFWeakAuras|r ayant les même noms que certains de vos graphiques existants. @@ -1075,6 +1096,8 @@ L["Scenario (Normal)"] = "Scenario (Normal)" L["Screen/Parent Group"] = "Écran/Groupe parent" L["Second"] = "Deuxième" L["Second Value of Tooltip Text"] = "Deuxième valeur du texte de l'info-bulle" +--[[Translation missing --]] +L["Secondary Stats"] = "Secondary Stats" L["Seconds"] = "Secondes" L["Select Frame"] = "Sélectionner le cadre" L["Separator"] = "Séparateur" @@ -1138,6 +1161,7 @@ L["Source"] = "Source" L["Source Affiliation"] = "Source Affiliation" --[[Translation missing --]] L["Source GUID"] = "Source GUID" +L["Source Info"] = "Source Info" L["Source Name"] = "Nom de source" --[[Translation missing --]] L["Source NPC Id"] = "Source NPC Id" @@ -1156,6 +1180,8 @@ L["Spacing"] = "Ecartement" L["Spark"] = "Étincelle" L["Spec Role"] = "Rôle de Spécification" --[[Translation missing --]] +L["Specific Currency ID"] = "Specific Currency ID" +--[[Translation missing --]] L["Specific Type"] = "Specific Type" L["Specific Unit"] = "Unité spécifique" L["Spell"] = "Sort" @@ -1193,6 +1219,8 @@ L["Stop"] = "Arrêter" L["Strength"] = "Force" L["String"] = "Séquence" --[[Translation missing --]] +L["Subevent Info"] = "Subevent Info" +--[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] L["Subtract Channel"] = "Subtract Channel" @@ -1227,6 +1255,8 @@ L["Tanking And Highest"] = "Tank et le plus haut" L["Tanking But Not Highest"] = "Tank mais pas le plus haut" L["Target"] = "Cible" L["Targeted"] = "Ciblé" +--[[Translation missing --]] +L["Tertiary Stats"] = "Tertiary Stats" L["Text"] = "Texte" --[[Translation missing --]] L["Thaddius"] = "Thaddius" diff --git a/WeakAuras/Locales/itIT.lua b/WeakAuras/Locales/itIT.lua index fe0d2f5..ec6c3c6 100644 --- a/WeakAuras/Locales/itIT.lua +++ b/WeakAuras/Locales/itIT.lua @@ -244,6 +244,8 @@ L["Buru the Gorger"] = "Buru the Gorger" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "Può essere usato per esempio per controllare se \"boss1target\" sia uguale a \"player\"." L["Cancel"] = "Cancella" --[[Translation missing --]] +L["Case Insensitive"] = "Case Insensitive" +--[[Translation missing --]] L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer." L["Cast"] = "Cast" --[[Translation missing --]] @@ -381,6 +383,8 @@ L["Debuff Class Icon"] = "Debuff Class Icon" --[[Translation missing --]] L["Debuff Type"] = "Debuff Type" --[[Translation missing --]] +L["Defensive Stats"] = "Defensive Stats" +--[[Translation missing --]] L["Deflect"] = "Deflect" --[[Translation missing --]] L["Desaturate"] = "Desaturate" @@ -398,6 +402,8 @@ L["Destination Affiliation"] = "Destination Affiliation" --[[Translation missing --]] L["Destination GUID"] = "Destination GUID" --[[Translation missing --]] +L["Destination Info"] = "Destination Info" +--[[Translation missing --]] L["Destination Name"] = "Destination Name" --[[Translation missing --]] L["Destination NPC Id"] = "Destination NPC Id" @@ -505,6 +511,8 @@ L["Environment Type"] = "Environment Type" --[[Translation missing --]] L["Environmental"] = "Environmental" --[[Translation missing --]] +L["Equipment"] = "Equipment" +--[[Translation missing --]] L["Equipment Set"] = "Equipment Set" --[[Translation missing --]] L["Equipment Set Equipped"] = "Equipment Set Equipped" @@ -638,6 +646,8 @@ L["Garr"] = "Garr" --[[Translation missing --]] L["Gehennas"] = "Gehennas" --[[Translation missing --]] +L["General"] = "General" +--[[Translation missing --]] L["General Rajaxx"] = "General Rajaxx" --[[Translation missing --]] L["Glancing"] = "Glancing" @@ -790,6 +800,8 @@ L["Instance"] = "Instance" --[[Translation missing --]] L["Instance Difficulty"] = "Instance Difficulty" --[[Translation missing --]] +L["Instance Info"] = "Instance Info" +--[[Translation missing --]] L["Instance Size Type"] = "Instance Size Type" --[[Translation missing --]] L["Instance Type"] = "Instance Type" @@ -970,6 +982,10 @@ L["Max Char "] = "Max Char " --[[Translation missing --]] L["Max Charges"] = "Max Charges" --[[Translation missing --]] +L["Max Health"] = "Max Health" +--[[Translation missing --]] +L["Max Power"] = "Max Power" +--[[Translation missing --]] L["Maximum"] = "Maximum" --[[Translation missing --]] L["Maximum Estimate"] = "Maximum Estimate" @@ -994,6 +1010,8 @@ L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" --[[Translation missing --]] L["Mirror"] = "Mirror" --[[Translation missing --]] +L["Miscellaneous"] = "Miscellaneous" +--[[Translation missing --]] L["Miss"] = "Miss" --[[Translation missing --]] L["Miss Type"] = "Miss Type" @@ -1260,6 +1278,8 @@ L["Precision"] = "Precision" --[[Translation missing --]] L["Preset"] = "Preset" --[[Translation missing --]] +L["Primary Stats"] = "Primary Stats" +--[[Translation missing --]] L["Princess Huhuran"] = "Princess Huhuran" --[[Translation missing --]] L["Print Profiling Results"] = "Print Profiling Results" @@ -1370,6 +1390,8 @@ L["Require Valid Target"] = "Require Valid Target" --[[Translation missing --]] L["Resist"] = "Resist" --[[Translation missing --]] +L["Resistances"] = "Resistances" +--[[Translation missing --]] L["Resisted"] = "Resisted" --[[Translation missing --]] L["Resolve collisions dialog"] = "Resolve collisions dialog" @@ -1448,6 +1470,8 @@ L["Second"] = "Second" --[[Translation missing --]] L["Second Value of Tooltip Text"] = "Second Value of Tooltip Text" --[[Translation missing --]] +L["Secondary Stats"] = "Secondary Stats" +--[[Translation missing --]] L["Seconds"] = "Seconds" --[[Translation missing --]] L["Select Frame"] = "Select Frame" @@ -1542,6 +1566,8 @@ L["Source Affiliation"] = "Source Affiliation" --[[Translation missing --]] L["Source GUID"] = "Source GUID" --[[Translation missing --]] +L["Source Info"] = "Source Info" +--[[Translation missing --]] L["Source Name"] = "Source Name" --[[Translation missing --]] L["Source NPC Id"] = "Source NPC Id" @@ -1566,6 +1592,8 @@ L["Spark"] = "Spark" --[[Translation missing --]] L["Spec Role"] = "Spec Role" --[[Translation missing --]] +L["Specific Currency ID"] = "Specific Currency ID" +--[[Translation missing --]] L["Specific Type"] = "Specific Type" --[[Translation missing --]] L["Specific Unit"] = "Specific Unit" @@ -1630,6 +1658,8 @@ L["Strength"] = "Strength" --[[Translation missing --]] L["String"] = "String" --[[Translation missing --]] +L["Subevent Info"] = "Subevent Info" +--[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] L["Subtract Channel"] = "Subtract Channel" @@ -1681,6 +1711,8 @@ L["Target"] = "Target" --[[Translation missing --]] L["Targeted"] = "Targeted" --[[Translation missing --]] +L["Tertiary Stats"] = "Tertiary Stats" +--[[Translation missing --]] L["Text"] = "Text" --[[Translation missing --]] L["Thaddius"] = "Thaddius" diff --git a/WeakAuras/Locales/koKR.lua b/WeakAuras/Locales/koKR.lua index c9890b6..4a9579e 100644 --- a/WeakAuras/Locales/koKR.lua +++ b/WeakAuras/Locales/koKR.lua @@ -201,6 +201,7 @@ L["Buffed/Debuffed"] = "강화 효과/약화 효과" L["Buru the Gorger"] = "먹보 부루" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "예를 들어 \"우두머리1대상\"이 \"플레이어\"와 같은지 확인하는데 사용할 수 있습니다." L["Cancel"] = "취소" +L["Case Insensitive"] = "대소문자 구분 안함" --[[Translation missing --]] L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer." L["Cast"] = "시전" @@ -293,6 +294,7 @@ L["Debuff"] = "약화 효과" L["Debuff Class"] = "약화 효과 직업" L["Debuff Class Icon"] = "약화 효과 직업 아이콘" L["Debuff Type"] = "약화 효과 유형" +L["Defensive Stats"] = "방어 능력치" L["Deflect"] = "튕김" L["Desaturate"] = "흑백" L["Desaturate Background"] = "흑백 배경" @@ -303,6 +305,7 @@ L["Dest Raid Mark"] = "대상 공격대 징표" --[[Translation missing --]] L["Destination Affiliation"] = "Destination Affiliation" L["Destination GUID"] = "대상 GUID" +L["Destination Info"] = "대상자 정보" L["Destination Name"] = "대상 이름" L["Destination NPC Id"] = "대상 NPC Id" --[[Translation missing --]] @@ -372,6 +375,7 @@ L["Entering/Leaving Combat"] = "전투 시작/종료" L["Entry Order"] = "항목 순서" L["Environment Type"] = "환경 종류" L["Environmental"] = "환경" +L["Equipment"] = "장비" L["Equipment Set"] = "장비 구성" L["Equipment Set Equipped"] = "장비 구성 착용" L["Equipment Slot"] = "장비 칸" @@ -455,6 +459,7 @@ L["Gahz'ranka"] = "가즈란카" L["Gained"] = "획득" L["Garr"] = "가르" L["Gehennas"] = "게헨나스" +L["General"] = "일반" L["General Rajaxx"] = "장군 라작스" L["Glancing"] = "비껴맞음" L["Global Cooldown"] = "전역 재사용 대기시간" @@ -536,6 +541,7 @@ L["Inherited"] = "상속" L["Instakill"] = "죽임" L["Instance"] = "인스턴스" L["Instance Difficulty"] = "인스턴스 난이도" +L["Instance Info"] = "인스턴스 던전 정보" L["Instance Size Type"] = "인스턴스 크기 유형" L["Instance Type"] = "인스턴스 유형" L["Instructor Razuvious"] = "훈련교관 라주비어스" @@ -642,6 +648,8 @@ L["Match Count per Unit"] = "유닛당 일치 횟수" L["Matches (Pattern)"] = "일치 (패턴)" L["Max Char "] = "최대 글자수" L["Max Charges"] = "최대 충전량" +L["Max Health"] = "최대 생명력" +L["Max Power"] = "최대 기력" L["Maximum"] = "최대" L["Maximum Estimate"] = "최대 예상치" L["Medium"] = "중간" @@ -656,6 +664,7 @@ L["Minimum Estimate"] = "최소 예상치" L["Minus (Small Nameplate)"] = "빼기 (작은 이름표)" --[[Translation missing --]] L["Mirror"] = "Mirror" +L["Miscellaneous"] = "기타" L["Miss"] = "빗나감" L["Miss Type"] = "적중 실패 유형" L["Missed"] = "적중 실패" @@ -812,6 +821,7 @@ L["Power (%)"] = "자원 (%)" L["Power Type"] = "자원 유형" L["Precision"] = "정밀도" L["Preset"] = "프리셋" +L["Primary Stats"] = "주 능력치" L["Princess Huhuran"] = "공주 후후란" L["Print Profiling Results"] = "프로파일링 결과 출력" L["Profiling already started."] = "프로파일링이 이미 시작되었습니다." @@ -870,6 +880,7 @@ L["Requested display not authorized"] = "요청한 디스플레이가 올바르 L["Requesting display information from %s ..."] = "%s의 디스플레이 정보 요청 중 ..." L["Require Valid Target"] = "유효 대상 필요" L["Resist"] = "저항" +L["Resistances"] = "저항" L["Resisted"] = "저항함" L["Resolve collisions dialog"] = [=[ 같은 이름을 가진 |cFF8800FFWeakAuras|r 디스플레이가 있습니다. @@ -932,6 +943,7 @@ L["Scenario (Normal)"] = "시나리오 (일반)" L["Screen/Parent Group"] = "화면/부모 그룹" L["Second"] = "두 번째" L["Second Value of Tooltip Text"] = "툴팁 문자의 두 번째 값" +L["Secondary Stats"] = "2차 능력치" L["Seconds"] = "초" L["Select Frame"] = "프레임 선택" --[[Translation missing --]] @@ -994,6 +1006,7 @@ L["Source"] = "Source" --[[Translation missing --]] L["Source Affiliation"] = "Source Affiliation" L["Source GUID"] = "행위자 GUID" +L["Source Info"] = "시전자 정보" L["Source Name"] = "행위자 이름" L["Source NPC Id"] = "행위자 NPC Id" --[[Translation missing --]] @@ -1007,6 +1020,7 @@ L["Space"] = "공간" L["Spacing"] = "간격" L["Spark"] = "섬광" L["Spec Role"] = "전문화 역할" +L["Specific Currency ID"] = "화폐 ID 지정" --[[Translation missing --]] L["Specific Type"] = "Specific Type" L["Specific Unit"] = "특정 유닛" @@ -1042,6 +1056,7 @@ L["Stolen"] = "훔침" L["Stop"] = "중지" L["Strength"] = "힘" L["String"] = "문자열" +L["Subevent Info"] = "서브이벤트 정보" --[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] @@ -1079,6 +1094,7 @@ L["Tanking But Not Highest"] = "탱커지만 제일 높지 않을 때" L["Target"] = "대상" --[[Translation missing --]] L["Targeted"] = "Targeted" +L["Tertiary Stats"] = "3차 능력치" L["Text"] = "문자" L["Thaddius"] = "타디우스" --[[Translation missing --]] diff --git a/WeakAuras/Locales/ptBR.lua b/WeakAuras/Locales/ptBR.lua index 0ebb1a0..91778eb 100644 --- a/WeakAuras/Locales/ptBR.lua +++ b/WeakAuras/Locales/ptBR.lua @@ -210,6 +210,8 @@ L["Buffed/Debuffed"] = "Buffado/Debuffado" L["Buru the Gorger"] = "Buru, o Banqueteador" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "Pode ser usado, por exemplo, para checar se \"chefe1alvo\" é o mesmo que \"jogador\"." L["Cancel"] = "Cancelar" +--[[Translation missing --]] +L["Case Insensitive"] = "Case Insensitive" L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Não é possível agendar o cronômetro com %i, devido a um bug do World of Warcraft com alto tempo de atividade do computador. (Tempo de atividade: %i). Por favor, reinicie o seu computador." L["Cast"] = "Lançar" L["Cast Bar"] = "Barra de Lançamento" @@ -322,6 +324,8 @@ L["Debuff Class Icon"] = "Debuff Class Icon" --[[Translation missing --]] L["Debuff Type"] = "Debuff Type" --[[Translation missing --]] +L["Defensive Stats"] = "Defensive Stats" +--[[Translation missing --]] L["Deflect"] = "Deflect" --[[Translation missing --]] L["Desaturate"] = "Desaturate" @@ -339,6 +343,8 @@ L["Destination Affiliation"] = "Destination Affiliation" --[[Translation missing --]] L["Destination GUID"] = "Destination GUID" --[[Translation missing --]] +L["Destination Info"] = "Destination Info" +--[[Translation missing --]] L["Destination Name"] = "Destination Name" --[[Translation missing --]] L["Destination NPC Id"] = "Destination NPC Id" @@ -446,6 +452,8 @@ L["Environment Type"] = "Environment Type" --[[Translation missing --]] L["Environmental"] = "Environmental" --[[Translation missing --]] +L["Equipment"] = "Equipment" +--[[Translation missing --]] L["Equipment Set"] = "Equipment Set" --[[Translation missing --]] L["Equipment Set Equipped"] = "Equipment Set Equipped" @@ -574,6 +582,8 @@ L["Garr"] = "Garr" --[[Translation missing --]] L["Gehennas"] = "Gehennas" --[[Translation missing --]] +L["General"] = "General" +--[[Translation missing --]] L["General Rajaxx"] = "General Rajaxx" --[[Translation missing --]] L["Glancing"] = "Glancing" @@ -726,6 +736,8 @@ L["Instance"] = "Instance" --[[Translation missing --]] L["Instance Difficulty"] = "Instance Difficulty" --[[Translation missing --]] +L["Instance Info"] = "Instance Info" +--[[Translation missing --]] L["Instance Size Type"] = "Instance Size Type" --[[Translation missing --]] L["Instance Type"] = "Instance Type" @@ -897,6 +909,10 @@ L["Max Char "] = "Max Char " --[[Translation missing --]] L["Max Charges"] = "Max Charges" --[[Translation missing --]] +L["Max Health"] = "Max Health" +--[[Translation missing --]] +L["Max Power"] = "Max Power" +--[[Translation missing --]] L["Maximum"] = "Maximum" --[[Translation missing --]] L["Maximum Estimate"] = "Maximum Estimate" @@ -917,6 +933,8 @@ L["Minimum Estimate"] = "Minimum Estimate" L["Minus (Small Nameplate)"] = "Minus (Small Nameplate)" --[[Translation missing --]] L["Mirror"] = "Mirror" +--[[Translation missing --]] +L["Miscellaneous"] = "Miscellaneous" L["Miss"] = "Falha" L["Miss Type"] = "Tipo de falha" L["Missed"] = "Falho" @@ -1148,6 +1166,8 @@ L["Power Type"] = "Tipo de poder" L["Precision"] = "Precision" L["Preset"] = "Predefinido" --[[Translation missing --]] +L["Primary Stats"] = "Primary Stats" +--[[Translation missing --]] L["Princess Huhuran"] = "Princess Huhuran" --[[Translation missing --]] L["Print Profiling Results"] = "Print Profiling Results" @@ -1244,6 +1264,8 @@ L["Requested display not authorized"] = "Exibição requerida não autorizada" L["Requesting display information from %s ..."] = "Requesting display information from %s ..." L["Require Valid Target"] = "Requer um alvo válido" L["Resist"] = "Resistir" +--[[Translation missing --]] +L["Resistances"] = "Resistances" L["Resisted"] = "Resistido" --[[Translation missing --]] L["Resolve collisions dialog"] = "Resolve collisions dialog" @@ -1313,6 +1335,8 @@ L["Screen/Parent Group"] = "Screen/Parent Group" L["Second"] = "Second" --[[Translation missing --]] L["Second Value of Tooltip Text"] = "Second Value of Tooltip Text" +--[[Translation missing --]] +L["Secondary Stats"] = "Secondary Stats" L["Seconds"] = "Segundos" --[[Translation missing --]] L["Select Frame"] = "Select Frame" @@ -1395,6 +1419,8 @@ L["Source"] = "Source" L["Source Affiliation"] = "Source Affiliation" --[[Translation missing --]] L["Source GUID"] = "Source GUID" +--[[Translation missing --]] +L["Source Info"] = "Source Info" L["Source Name"] = "Origem do nome" --[[Translation missing --]] L["Source NPC Id"] = "Source NPC Id" @@ -1417,6 +1443,8 @@ L["Spark"] = "Spark" --[[Translation missing --]] L["Spec Role"] = "Spec Role" --[[Translation missing --]] +L["Specific Currency ID"] = "Specific Currency ID" +--[[Translation missing --]] L["Specific Type"] = "Specific Type" L["Specific Unit"] = "Unidade específica" L["Spell"] = "Feitiço" @@ -1470,6 +1498,8 @@ L["Strength"] = "Strength" --[[Translation missing --]] L["String"] = "String" --[[Translation missing --]] +L["Subevent Info"] = "Subevent Info" +--[[Translation missing --]] L["Subtract Cast"] = "Subtract Cast" --[[Translation missing --]] L["Subtract Channel"] = "Subtract Channel" @@ -1517,6 +1547,8 @@ L["Target"] = "Alvo" --[[Translation missing --]] L["Targeted"] = "Targeted" --[[Translation missing --]] +L["Tertiary Stats"] = "Tertiary Stats" +--[[Translation missing --]] L["Text"] = "Text" --[[Translation missing --]] L["Thaddius"] = "Thaddius" diff --git a/WeakAuras/Locales/ruRU.lua b/WeakAuras/Locales/ruRU.lua index 9ad489a..3745be1 100644 --- a/WeakAuras/Locales/ruRU.lua +++ b/WeakAuras/Locales/ruRU.lua @@ -238,6 +238,7 @@ L["Buru the Gorger"] = "Буру Ненасытный" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = [=[Используется для проверки того факта, что две единицы - одна и та же сущность, объект. Например: выбрав в качестве единицы игрока и указав для данного параметра значение "boss1target", можно определить, являетесь ли вы целью босса.]=] L["Cancel"] = "Отмена" +L["Case Insensitive"] = "Без учета регистра" L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "Невозможно запустить таймер на %i c. из-за ошибки WoW (переполнение), связанной с большим временем непрерывной работы вашего компьютера - %i с. Пожалуйста, перезагрузите компьютер." L["Cast"] = "Применение заклинания" L["Cast Bar"] = "Полоса применения заклинания" @@ -327,6 +328,8 @@ L["Debuff"] = "Дебафф" L["Debuff Class"] = "Тип дебаффа" L["Debuff Class Icon"] = "Иконка дебаффа" L["Debuff Type"] = "Тип дебаффа" +--[[Translation missing --]] +L["Defensive Stats"] = "Defensive Stats" L["Defense"] = "Защита" L["Deflect"] = "Отклонение" L["Desaturate"] = "Обесцветить" @@ -337,6 +340,8 @@ L["Description"] = "Описание" L["Dest Raid Mark"] = "Метка получателя" L["Destination Affiliation"] = "Принадлежность получателя" L["Destination GUID"] = "GUID получателя" +--[[Translation missing --]] +L["Destination Info"] = "Destination Info" L["Destination Name"] = "Имя получателя" L["Destination NPC Id"] = "ID NPC-получателя" L["Destination Object Type"] = "Тип объекта получателя" @@ -395,6 +400,7 @@ L["Entering/Leaving Combat"] = "Вход / Выход из боя" L["Entry Order"] = "Порядок записей" L["Environment Type"] = "Тип окружения" L["Environmental"] = "Окружающий мир" +L["Equipment"] = "Экипировка" L["Equipment Set"] = "Комплект экипировки" L["Equipment Set Equipped"] = "Комплект экипировки надет" L["Equipment Slot"] = "Ячейка экипировки" @@ -467,6 +473,7 @@ L["Gahz'ranka"] = "Газ'ранка" L["Gained"] = "Получен" L["Garr"] = "Гарр" L["Gehennas"] = "Гееннас" +L["General"] = "Общее" L["General Rajaxx"] = "Генерал Раджакс" L["Glancing"] = "Скользящий удар" L["Global Cooldown"] = "Общее время восстановления (GCD)" @@ -549,6 +556,8 @@ L["Inherited"] = "Наследуемый атрибут" L["Instakill"] = "Моментальное убийство" L["Instance"] = "Подземелье" L["Instance Difficulty"] = "Сложность подземелья" +--[[Translation missing --]] +L["Instance Info"] = "Instance Info" L["Instance Size Type"] = "Тип размера подземелья" L["Instance Type"] = "Тип подземелья" L["Instructor Razuvious"] = "Инструктор Разувий" @@ -643,6 +652,8 @@ L["Match Count per Unit"] = "Кол-во совпадений на единиц L["Matches (Pattern)"] = "Совпадения по шаблону" L["Max Char "] = "Макс. количество символов" L["Max Charges"] = "Макс. количество зарядов" +L["Max Health"] = "Макс. запас здоровья" +L["Max Power"] = "Макс. запас энергии" L["Maximum"] = "Макс. значение" L["Maximum Estimate"] = "Макс. оценка" L["Medium"] = "Средний" @@ -655,6 +666,8 @@ L["Minimum"] = "Мин. значение" L["Minimum Estimate"] = "Мин. оценка" L["Minus (Small Nameplate)"] = "Незначительный" L["Mirror"] = "Отразить" +--[[Translation missing --]] +L["Miscellaneous"] = "Miscellaneous" L["Miss"] = "Промах" L["Miss Type"] = "Тип промаха" L["Missed"] = "Промах" @@ -801,6 +814,8 @@ L["Power Deficit"] = "Недостающая энергия" L["Power Type"] = "Тип энергии" L["Precision"] = "Точность" L["Preset"] = "Набор эффектов" +--[[Translation missing --]] +L["Primary Stats"] = "Primary Stats" L["Princess Huhuran"] = "Принцесса Хухуран" L["Print Profiling Results"] = "Вывести результаты профилирования" L["Profiling already started."] = "Профилирование уже запущено." @@ -859,6 +874,8 @@ L["Requested display not authorized"] = "Запрошенная индикаци L["Requesting display information from %s ..."] = "Запрос информации об индикации от %s ..." L["Require Valid Target"] = "Требуется допустимая цель" L["Resist"] = "Сопротивление" +--[[Translation missing --]] +L["Resistances"] = "Resistances" L["Resisted"] = "Сопротивление" L["Resolve collisions dialog"] = [=[Вы включили аддон в котором определены индикации |cFF8800FFWeakAuras|r которые имеют те же имена, что и существующие. @@ -916,6 +933,8 @@ L["Scenario (Normal)"] = "Сценарий (обычный)" L["Screen/Parent Group"] = "Экран / Исходная группа" L["Second"] = "Второе" L["Second Value of Tooltip Text"] = "Второе значение из текста подсказки" +--[[Translation missing --]] +L["Secondary Stats"] = "Secondary Stats" L["Seconds"] = "Секунды" L["Select Frame"] = "Выбрать кадр" L["Separator"] = "Разделитель" @@ -965,6 +984,8 @@ L["Sound by Kit ID"] = "Звук по ID набора" L["Source"] = "Источник" L["Source Affiliation"] = "Принадлежность источника" L["Source GUID"] = "GUID источника" +--[[Translation missing --]] +L["Source Info"] = "Source Info" L["Source Name"] = "Имя источника" L["Source NPC Id"] = "ID NPC-источника" L["Source Object Type"] = "Тип объекта источника" @@ -977,6 +998,7 @@ L["Space"] = "Отступ" L["Spacing"] = "Расстояние" L["Spark"] = "Искра" L["Spec Role"] = "Роль специализации" +L["Specific Currency ID"] = "ID валюты" L["Specific Type"] = "Конкретный тип" L["Specific Unit"] = "Конкретная единица" L["Spell"] = "Заклинание" @@ -1013,6 +1035,8 @@ L["Stolen"] = "Кража" L["Stop"] = "Остановить" L["Strength"] = "Сила" L["String"] = "Строка" +--[[Translation missing --]] +L["Subevent Info"] = "Subevent Info" L["Subtract Cast"] = "Вычесть применение заклинания" L["Subtract Channel"] = "Вычесть поддержание заклинания" L["Subtract GCD"] = "Вычесть GCD" @@ -1044,6 +1068,8 @@ L["Tanking And Highest"] = "Вы основная цель; макс. угроз L["Tanking But Not Highest"] = "Вы основная цель; не макс. угроза" L["Target"] = "Цель" L["Targeted"] = "Цель" +--[[Translation missing --]] +L["Tertiary Stats"] = "Tertiary Stats" L["Text"] = "Текст" L["Thaddius"] = "Таддиус" L["The aura has overwritten the global '%s', this might affect other auras."] = "Индикация перезаписала значение глобальной переменной %s. Это может повлиять как на другие индикации, так и на ваш интерфейс!" diff --git a/WeakAuras/Locales/zhCN.lua b/WeakAuras/Locales/zhCN.lua index 75dfa07..d763389 100644 --- a/WeakAuras/Locales/zhCN.lua +++ b/WeakAuras/Locales/zhCN.lua @@ -192,6 +192,7 @@ L["Buffed/Debuffed"] = "获得增益/减益效果" L["Buru the Gorger"] = "吞咽者布鲁" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "可以用来检测类似于一号首领的目标(boss1target)是不是玩家自身(player)之类的信息。" L["Cancel"] = "取消" +L["Case Insensitive"] = "大小写不敏感" L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "由于计算机长时间开机造成的魔兽世界故障,无法设置 %i 秒后的计时器。(开机时间:%i)。请重启你的计算机。" L["Cast"] = "施法" L["Cast Bar"] = "施法条" @@ -274,6 +275,7 @@ L["Debuff"] = "Debuff" L["Debuff Class"] = "减益效果类型" L["Debuff Class Icon"] = "减益效果类型图标" L["Debuff Type"] = "Debuff 类型" +L["Defensive Stats"] = "防御属性" L["Deflect"] = "偏斜" L["Desaturate"] = "褪色" L["Desaturate Background"] = "背景褪色" @@ -283,6 +285,7 @@ L["Description"] = "描述" L["Dest Raid Mark"] = "目标团队标记" L["Destination Affiliation"] = "目标所属" L["Destination GUID"] = "目标GUID" +L["Destination Info"] = "目标信息" L["Destination Name"] = "目标名称" L["Destination NPC Id"] = "目标 NPC ID" L["Destination Object Type"] = "目标类型" @@ -337,6 +340,7 @@ L["Entering/Leaving Combat"] = "进入/离开战斗" L["Entry Order"] = "条目排序" L["Environment Type"] = "环境伤害类型" L["Environmental"] = "环境伤害" +L["Equipment"] = "装备" L["Equipment Set"] = "装备方案" L["Equipment Set Equipped"] = "装备方案已使用" L["Equipment Slot"] = "装备栏" @@ -405,6 +409,7 @@ L["Gahz'ranka"] = "加兹兰卡" L["Gained"] = "获得了" L["Garr"] = "加尔" L["Gehennas"] = "基赫纳斯" +L["General"] = "一般" L["General Rajaxx"] = "拉贾克斯将军" L["Glancing"] = "躲闪" L["Global Cooldown"] = "公共冷却" @@ -481,6 +486,7 @@ L["Inherited"] = "继承" L["Instakill"] = "术士牺牲爪牙" L["Instance"] = "副本" L["Instance Difficulty"] = "副本难度" +L["Instance Info"] = "副本信息" L["Instance Size Type"] = "副本大小类型" L["Instance Type"] = "副本类型" L["Instructor Razuvious"] = "教官拉苏维奥斯" @@ -571,6 +577,8 @@ L["Match Count per Unit"] = "每个单位的匹配数量" L["Matches (Pattern)"] = "匹配(表达式)" L["Max Char "] = "最大字符数" L["Max Charges"] = "最大充能次数" +L["Max Health"] = "最大生命值" +L["Max Power"] = "最大能量值" L["Maximum"] = "最大" L["Maximum Estimate"] = "最大预估" L["Medium"] = "中" @@ -583,6 +591,7 @@ L["Minimum"] = "最小" L["Minimum Estimate"] = "最小预估" L["Minus (Small Nameplate)"] = "次要目标(小型姓名版)" L["Mirror"] = "镜像" +L["Miscellaneous"] = "其他" L["Miss"] = "未命中" L["Miss Type"] = "未命中类型" L["Missed"] = "未命中" @@ -716,6 +725,7 @@ L["Power (%)"] = "能量(%%)" L["Power Type"] = "能量类型" L["Precision"] = "精度" L["Preset"] = "预设" +L["Primary Stats"] = "主属性" L["Princess Huhuran"] = "哈霍兰公主" L["Print Profiling Results"] = "输出性能分析结果" L["Profiling already started."] = "性能分析已开始。" @@ -771,6 +781,7 @@ L["Requested display not authorized"] = "请求接收的图示没有授权" L["Requesting display information from %s ..."] = "请求来 %s 的显示信息" L["Require Valid Target"] = "需要有效目标" L["Resist"] = "抵抗" +L["Resistances"] = "抗性" L["Resisted"] = "被抵抗" L["Resolve collisions dialog"] = [=[你安装的插件中定义了与|cFF8800FFWeakAuras|r 图示相同名称的变量。 @@ -826,6 +837,7 @@ L["Scenario (Normal)"] = "场景战役(普通)" L["Screen/Parent Group"] = "屏幕/上级群组" L["Second"] = "第二" L["Second Value of Tooltip Text"] = "鼠标提示文本的第二项值" +L["Secondary Stats"] = "副属性" L["Seconds"] = "秒" L["Select Frame"] = "选择框体" L["Separator"] = "分隔符" @@ -873,6 +885,7 @@ L["Sound by Kit ID"] = "根据 ID 选择音效" L["Source"] = "来源" L["Source Affiliation"] = "来源所属" L["Source GUID"] = "来源GUID" +L["Source Info"] = "来源信息" L["Source Name"] = "来源名称" L["Source NPC Id"] = "来源 NPC ID" L["Source Object Type"] = "来源类型" @@ -885,6 +898,7 @@ L["Space"] = "空白" L["Spacing"] = "间距" L["Spark"] = "闪光" L["Spec Role"] = "专精职责" +L["Specific Currency ID"] = "特定货币ID" L["Specific Type"] = "特定类型" L["Specific Unit"] = "指定单位" L["Spell"] = "法术" @@ -917,6 +931,7 @@ L["Stolen"] = "偷取" L["Stop"] = "停止" L["Strength"] = "力量" L["String"] = "字符串" +L["Subevent Info"] = "子事件信息" L["Subtract Cast"] = "减去施法时间" L["Subtract Channel"] = "减去引导时间" L["Subtract GCD"] = "减去 GCD" @@ -943,6 +958,7 @@ L["Tanking And Highest"] = "做T并且最高" L["Tanking But Not Highest"] = "做T但不是最高" L["Target"] = "目标" L["Targeted"] = "被选中" +L["Tertiary Stats"] = "第三属性" L["Text"] = "文本" L["Thaddius"] = "塔迪乌斯" L["The aura has overwritten the global '%s', this might affect other auras."] = "此光环覆盖了全局变量'%s',可能会影响其他光环。" diff --git a/WeakAuras/Locales/zhTW.lua b/WeakAuras/Locales/zhTW.lua index f9c55d1..56007af 100644 --- a/WeakAuras/Locales/zhTW.lua +++ b/WeakAuras/Locales/zhTW.lua @@ -194,6 +194,7 @@ L["Buffed/Debuffed"] = "有增益/減益效果" L["Buru the Gorger"] = "『暴食者』布魯" L["Can be used for e.g. checking if \"boss1target\" is the same as \"player\"."] = "可用於,例如檢查 \"boss1target\" 和 \"player\" 是否相同。" L["Cancel"] = "取消" +L["Case Insensitive"] = "不區分大小寫" L["Can't schedule timer with %i, due to a World of Warcraft bug with high computer uptime. (Uptime: %i). Please restart your computer."] = "由於魔獸世界的 bug 導致電腦運算時間很長 (運算時間: %i),因此無法為 %i 排程計時器,請重新啟動電腦。" L["Cast"] = "施法" L["Cast Bar"] = "施法條" @@ -276,6 +277,7 @@ L["Debuff"] = "減益" L["Debuff Class"] = "減益類別" L["Debuff Class Icon"] = "減益類別圖示" L["Debuff Type"] = "減益類型" +L["Defensive Stats"] = "防守屬性" L["Deflect"] = "偏斜" L["Desaturate"] = "去色" L["Desaturate Background"] = "背景去色" @@ -286,6 +288,7 @@ L["Dest Raid Mark"] = "目標的標記圖示" --[[Translation missing --]] L["Destination Affiliation"] = "Destination Affiliation" L["Destination GUID"] = "目標 GUID" +L["Destination Info"] = "目的地資訊" L["Destination Name"] = "目標名稱" L["Destination NPC Id"] = "目標 NPC ID" L["Destination Object Type"] = "目標物件類型" @@ -340,6 +343,7 @@ L["Entering/Leaving Combat"] = "進入/離開戰鬥" L["Entry Order"] = "項目順序" L["Environment Type"] = "環境類型" L["Environmental"] = "環境" +L["Equipment"] = "裝備" L["Equipment Set"] = "裝備管理員設定" L["Equipment Set Equipped"] = "已裝備裝備管理員設定" L["Equipment Slot"] = "裝備欄位" @@ -408,6 +412,7 @@ L["Gahz'ranka"] = "加茲蘭卡" L["Gained"] = "獲得" L["Garr"] = "加爾" L["Gehennas"] = "基赫納斯" +L["General"] = "一般" L["General Rajaxx"] = "拉賈克斯將軍" L["Glancing"] = "偏斜" L["Global Cooldown"] = "共用冷卻 (GCD)" @@ -485,6 +490,7 @@ L["Inherited"] = "繼承" L["Instakill"] = "秒殺" L["Instance"] = "副本" L["Instance Difficulty"] = "副本難度" +L["Instance Info"] = "副本資訊" L["Instance Size Type"] = "副本大小類型" L["Instance Type"] = "副本類型" L["Instructor Razuvious"] = "講師拉祖維斯" @@ -576,6 +582,8 @@ L["Match Count per Unit"] = "每個單位符合的數量" L["Matches (Pattern)"] = "符合模式 (Pattern)" L["Max Char "] = "最多字元數" L["Max Charges"] = "最大可用次數" +L["Max Health"] = "最大血量" +L["Max Power"] = "最大能量" L["Maximum"] = "最大值" L["Maximum Estimate"] = "最大估計" L["Medium"] = "中" @@ -588,6 +596,7 @@ L["Minimum"] = "最小值" L["Minimum Estimate"] = "最小估計" L["Minus (Small Nameplate)"] = "減去 (小型血條/名條)" L["Mirror"] = "鏡像" +L["Miscellaneous"] = "雜項" L["Miss"] = "未命中" L["Miss Type"] = "未命中類型" L["Missed"] = "未命中" @@ -724,6 +733,7 @@ L["Power (%)"] = "能量 (%)" L["Power Type"] = "能量類型" L["Precision"] = "精確度" L["Preset"] = "預設" +L["Primary Stats"] = "主要屬性" L["Princess Huhuran"] = "哈霍蘭公主" L["Print Profiling Results"] = "顯示分析結果" L["Profiling already started."] = "分析早已開始了。" @@ -779,6 +789,7 @@ L["Requested display not authorized"] = "需求的提醒效果沒有授權" L["Requesting display information from %s ..."] = "正在請求來自於 %s 的顯示資訊..." L["Require Valid Target"] = "需要有效目標" L["Resist"] = "抵抗" +L["Resistances"] = "抗性" L["Resisted"] = "被抵抗" L["Resolve collisions dialog"] = [=[你已經啟用插件定義|cFF8800FFWeakAuras|r顯示與你已存在的顯示有相同名稱。 @@ -826,6 +837,7 @@ L["Scenario (Normal)"] = "事件(普通)" L["Screen/Parent Group"] = "螢幕/所屬群組" L["Second"] = "第二個" L["Second Value of Tooltip Text"] = "滑鼠提示文字中的第二個值" +L["Secondary Stats"] = "次要屬性" L["Seconds"] = "秒數" L["Select Frame"] = "選擇的框架" L["Separator"] = "分隔線" @@ -874,6 +886,7 @@ L["Source"] = "來源" --[[Translation missing --]] L["Source Affiliation"] = "Source Affiliation" L["Source GUID"] = "來源 GUID" +L["Source Info"] = "來源資訊" L["Source Name"] = "來源的名稱" L["Source NPC Id"] = "來源 NPC ID" L["Source Object Type"] = "來源物件類型" @@ -886,6 +899,7 @@ L["Space"] = "間距" L["Spacing"] = "間距" L["Spark"] = "亮點" L["Spec Role"] = "專精角色" +L["Specific Currency ID"] = "特定兌換通貨ID" L["Specific Type"] = "指定類型" L["Specific Unit"] = "指定單位" L["Spell"] = "法術" @@ -918,6 +932,7 @@ L["Stolen"] = "被偷竊" L["Stop"] = "停止" L["Strength"] = "力量" L["String"] = "文字字串" +L["Subevent Info"] = "子事件資訊" L["Subtract Cast"] = "減去施法" L["Subtract Channel"] = "減去頻道" L["Subtract GCD"] = "減去 GCD" @@ -944,6 +959,7 @@ L["Tanking And Highest"] = "坦怪中並且是最高" L["Tanking But Not Highest"] = "坦怪中但不是最高" L["Target"] = "目標" L["Targeted"] = "當前目標" +L["Tertiary Stats"] = "第三屬性" L["Text"] = "文字" L["Thaddius"] = "泰迪斯" L["The aura has overwritten the global '%s', this might affect other auras."] = "這個提醒效果會覆蓋全域的 '%s',將會影響其他提醒效果。" diff --git a/WeakAuras/Media/Textures/spinboxleft.tga b/WeakAuras/Media/Textures/spinboxleft.tga new file mode 100644 index 0000000000000000000000000000000000000000..e3f124f6c383160beeacf70cfcb7151f92f8d8db GIT binary patch literal 980 zcmajeOA5j;5C-4~E~Fc;;05#sx~mWn1z&ib`mXP{?gT;bSbCB;|9~5D{8MHid^Amy z8RsJR83iX#?uzLJDH}q_OWY+eo)VP=ayGdSIhj0w98DfV4knKvdy~hIoyil(*5oN< zV{!^vn>>T8OrArQCNChGexA9$s7rkFORl7>pVbXyWEx345=p^H+;q!-kt|HMMShAL u2{}-59po}eDUd=UWk`ycv;b)!(tg^aC>e})vlDlH%Qx!9Ue(v)l6wRC>o(#5 literal 0 HcmV?d00001 diff --git a/WeakAuras/Media/Textures/spinboxlefth.tga b/WeakAuras/Media/Textures/spinboxlefth.tga new file mode 100644 index 0000000000000000000000000000000000000000..a24894923b1d927481ece85d1c6b7811276f01b8 GIT binary patch literal 980 zcmajeNeTin5CzZ(E~GbJ!3*dObk{;a6rAun?L5!ZP7nl-Wlqx8FK{E4KTQ>cN2k+C zm2;8%jDnLVcf<6Glno)|B_0x~#7m-*KrSZtA!m~Zkdw(n$kF5x@(8jwc?{W^Jb`RY zo<_0;1{Xnd^(X#5cd>O3M0K-9SdBfy5)0lsZW_-SS@~3zKb; xpCU&>4wPI6xlB?Dq>xA%k|HK8KpKd&pSCDU2BY2Vgx#nWHR{D)HL8Ur_XhZG)As-X literal 0 HcmV?d00001 diff --git a/WeakAuras/Media/Textures/spinboxoverlay.tga b/WeakAuras/Media/Textures/spinboxoverlay.tga new file mode 100644 index 0000000000000000000000000000000000000000..3b1f3f7772a828145229baa9258d3f5fef569fe9 GIT binary patch literal 576 zcmZQz;9`ISMg;~14yFkcCNTW}{~v^9fcXFapCEz>h(TNikTlcZzkfmUAi<+RjHCv{ z1xqvi`}Yr|rW}ZW12K{s5Vss8%?M;@0`V&#hN=Pyfw-C=y%4ki0$E_^K)4{@Fa+5A ki!XeL316b(iHP`yrI3)IP}eZeU{8NP-3T{NA6GpF0OV`l#sB~S literal 0 HcmV?d00001 diff --git a/WeakAuras/Media/Textures/spinboxright.tga b/WeakAuras/Media/Textures/spinboxright.tga new file mode 100644 index 0000000000000000000000000000000000000000..cb99db84015c09ac633b15849d1a18f37e95aa59 GIT binary patch literal 980 zcmajeNeaS15CzZ@Tu3%v!3*dObQd8Y3Ql;PIM4I669mCy=}Fr91@0_=g=$D1>2$iQ zL?Zb{LG;SqaGPSth7c;6FHOWlGk=BjUA{mDE}tPomrsz9%SXuA&h4 umXHl4$3YI0lmaOvQii06Nehq$BJF1_ijqOJo1M6uw30@>*sCVBxFjEL0yg3R literal 0 HcmV?d00001 diff --git a/WeakAuras/Media/Textures/spinboxrighth.tga b/WeakAuras/Media/Textures/spinboxrighth.tga new file mode 100644 index 0000000000000000000000000000000000000000..9b86298337ecd598c24ac0add7153d190158e00b GIT binary patch literal 980 zcmajeOA5j;5C-4~E~Fc;;05#sx~mWn1z&ib`mXP{?gT;bSmq=;|A4L>|CAYMKboe= zjB}CujDnLZcg1ajlno(NB%Ts4iMvGp0_mH4h73$TL53zDAtRFykg>^o$i(CwWNPvj zlA64M%uHTG<|eNo3zL@+O+WWsU(_kUWeJS$k?3c20Zty@5?DskLn6{8|3xw}Sr+*z vvL$3g$#IawB&9$KiIgEJV$uSnfk^vli=t#O+RaYf^)2717kgD-i%aee=T`#S literal 0 HcmV?d00001 diff --git a/WeakAuras/Media/Textures/spinboxrightp.tga b/WeakAuras/Media/Textures/spinboxrightp.tga new file mode 100644 index 0000000000000000000000000000000000000000..f570b458307ed219dda5598c74308a1e2c7f9158 GIT binary patch literal 980 zcmajeNeaS15CzZ{Tu3%v!3*dObQhsP6rAunah~UCCkTQk>2v5ww0?oEEPsb8NFM2Q zx~rUv+-KyRT$u}Q6Qpzqp(OE;cuCwOvS&!ww*KdTFH^7xv-Qj+cxkuLc!l8MQ( x$WM_iAsb4LgB&I)1yV?)3`r4_79b5o+D}^)C4!XaBprg)As-X literal 0 HcmV?d00001 diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index db26d32..e36b8d6 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -1195,5 +1195,179 @@ function Private.Modernize(data) end end + if data.internalVersion < 67 then + local function migrateToTable(tab, field) + local value = tab[field] + if value ~= nil and type(value) ~= "table" then + tab[field] = { value } + end + end + + do + local trigger_migration = { + ["Cast"] = { + "stage", + "stage_operator", + }, + ["Experience"] = { + "level", + "level_operator", + "currentXP", + "currentXP_operator", + "totalXP", + "totalXP_operator", + "percentXP", + "percentXP_operator", + "restedXP", + "restedXP_operator", + "percentrested", + "percentrested_operator", + }, + ["Health"] = { + "health", + "health_operator", + "percenthealth", + "percenthealth_operator", + "deficit", + "deficit_operator", + "maxhealth", + "maxhealth_operator", + }, + ["Power"] = { + "power", + "power_operator", + "percentpower", + "percentpower_operator", + "deficit", + "deficit_operator", + "maxpower", + "maxpower_operator", + }, + ["Character Stats"] = { + "strength", + "strength_operator", + "agility", + "agility_operator", + "stamina", + "stamina_operator", + "intellect", + "intellect_operator", + "spirit", + "spirit_operator", + "meleecriticalrating", + "meleecriticalrating_operator", + "rangedcriticalrating", + "rangedcriticalrating_operator", + "spellcriticalrating", + "spellcriticalrating_operator", + "meleecriticalpercent", + "meleecriticalpercent_operator", + "rangedcriticalpercent", + "rangedcriticalpercent_operator", + "spellcriticalpercent", + "spellcriticalpercent_operator", + "meleehasterating", + "meleehasterating_operator", + "rangedhasterating", + "rangedhasterating_operator", + "spellhasterating", + "spellhasterating_operator", + "resistancefire", + "resistancefire_operator", + "resistancenature", + "resistancenature_operator", + "resistancefrost", + "resistancefrost_operator", + "resistanceshadow", + "resistanceshadow_operator", + "resistancearcane", + "resistancearcane_operator", + "movespeedpercent", + "movespeedpercent_operator", + "dodgerating", + "dodgerating_operator", + "dodgepercent", + "dodgepercent_operator", + "parryrating", + "parryrating_operator", + "parrypercent", + "parrypercent_operator", + "blockrating", + "blockrating_operator", + "blockpercent", + "blockpercent_operator", + "armorrating", + "armorrating_operator", + "armorpercent", + "armorpercent_operator", + }, + ["Threat Situation"] = { + "threatpct", + "threatpct_operator", + "rawthreatpct", + "rawthreatpct_operator", + "threatvalue", + "threatvalue_operator", + }, + ["Unit Characteristics"] = { + "level", + "level_operator", + }, + ["Combat Log"] = { + "spellId", + "spellName", + }, + ["Location"] = { + "zone", + "zone_operator", + "subzone", + "subzone_operator", + } + } + for _, triggerData in ipairs(data.triggers) do + local t = triggerData.trigger + local fieldsToMigrate = trigger_migration[t.event] + if fieldsToMigrate then + for _, field in ipairs(fieldsToMigrate) do + migrateToTable(t, field) + end + end + -- cast trigger move data from 'spell' & 'spellId' to 'spellIds' & 'spellNames' + if t.event == "Cast" and t.type == "unit" then + if t.spellId then + if t.useExactSpellId then + t.use_spellIds = t.use_spellId + t.spellIds = t.spellIds or {} + tinsert(t.spellIds, t.spellId) + else + t.use_spellNames = t.use_spellId + t.spellNames = t.spellNames or {} + tinsert(t.spellNames, t.spellId) + end + end + if t.use_spell and t.spell then + t.use_spellNames = true + t.spellNames = t.spellNames or {} + tinsert(t.spellNames, t.spell) + end + t.use_spellId = nil + t.spellId = nil + t.use_spell = nil + t.spell = nil + end + end + end + do + local loadFields = { + "level", "itemequiped", "itemequiped" + } + + for _, field in ipairs(loadFields) do + migrateToTable(data.load, field) + migrateToTable(data.load, field .. "_operator") + end + end + end + data.internalVersion = max(data.internalVersion or 0, WeakAuras.InternalVersion()); end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 79a7373..fe764a6 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -584,18 +584,48 @@ function WeakAuras.CheckNumericIds(loadids, currentId) return false; end -function WeakAuras.CheckString(ids, currentId) - if (not ids or not currentId) then - return false; - end - - for id in ids:gmatch('([^,]+)') do - if id:trim() == currentId then - return true +function WeakAuras.TimeToSeconds(val) + if tonumber(val) then + return tonumber(val) + else + local sign = 1 + if val:sub(1,1) == "-" then + sign = -1 + val = val:sub(2, #val) + end + local h, m, s = val:match("^(%d+):(%d+):([%d%.]+)$") + if h and m and s then + return (h*3600 + m*60 + s) * sign + else + local m, s = val:match("^(%d+):([%d%.]+)$") + if m and s then + return (m*60 + s) * sign + end end end +end - return false; +Private.tinySecondFormat = function(value) + if type(value) == "string" then value = tonumber(value) end + if type(value) == "number" then + local negative = value < 0 + value = math.abs(value) + local fraction = value - math.floor(value) + local ret + if value > 3600 then + ret = ("%i:%02i:%02i"):format(math.floor(value / 3600), math.floor((value % 3600) / 60), value % 60) + elseif value > 60 then + ret = ("%i:%02i"):format(math.floor(value / 60), value % 60) + else + ret = ("%i"):format(value) + end + local negSign = negative and "-" or "" + if fraction > 0 then + return negSign .. ret .. tostring(Round(fraction * 100) / 100):sub(2) + else + return negSign .. ret + end + end end function WeakAuras.ValidateNumeric(info, val) @@ -772,6 +802,11 @@ end Private.load_prototype = { args = { + { + name ="generalTitle", + display = L["General"], + type = "description", + }, { name = "combat", display = L["In Combat"], @@ -839,7 +874,13 @@ Private.load_prototype = { width = WeakAuras.normalWidth, init = "arg", values = "group_types", - events = {"PARTY_MEMBERS_CHANGED", "RAID_ROSTER_UPDATE"} + events = {"PARTY_MEMBERS_CHANGED", "RAID_ROSTER_UPDATE"}, + optional = true, + }, + { + name ="playerTitle", + display = L["Player"], + type = "description", }, { name = "player", @@ -857,6 +898,7 @@ Private.load_prototype = { name = "namerealm", display = L["Player Name/Realm"], type = "string", + multiline = true, test = "nameRealmChecker:Check(player, realm)", preamble = "local nameRealmChecker = WeakAuras.ParseNameCheck(%q)", desc = constants.nameRealmFilterDesc, @@ -865,6 +907,7 @@ Private.load_prototype = { name = "ignoreNameRealm", display = L["|cFFFF0000Not|r Player Name/Realm"], type = "string", + multiline = true, test = "not nameRealmIgnoreChecker:Check(player, realm)", preamble = "local nameRealmIgnoreChecker = WeakAuras.ParseNameCheck(%q)", desc = constants.nameRealmFilterDesc, @@ -891,7 +934,10 @@ Private.load_prototype = { values = valuesForTalentFunction, test = "WeakAuras.CheckTalentByIndex(%d)", enable = function(trigger) - return trigger.use_talent ~= nil or trigger.use_talent2 ~= nil; + return trigger.use_talent ~= nil or trigger.use_talent2 ~= nil + end, + hidden = function(trigger) + return not (trigger.use_talent ~= nil or trigger.use_talent2 ~= nil) end, events = {"PLAYER_TALENT_UPDATE", "SPELL_UPDATE_USABLE"} }, @@ -902,7 +948,10 @@ Private.load_prototype = { values = valuesForTalentFunction, test = "WeakAuras.CheckTalentByIndex(%d)", enable = function(trigger) - return (trigger.use_talent ~= nil and trigger.use_talent2 ~= nil) or trigger.use_talent3 ~= nil; + return (trigger.use_talent ~= nil and trigger.use_talent2 ~= nil) or trigger.use_talent3 ~= nil + end, + hidden = function(trigger) + return not ((trigger.use_talent ~= nil and trigger.use_talent2 ~= nil) or trigger.use_talent3 ~= nil) end, events = {"PLAYER_TALENT_UPDATE", "SPELL_UPDATE_USABLE"} }, @@ -941,7 +990,11 @@ Private.load_prototype = { display = L["Player Level"], type = "number", init = "arg", - events = {"PLAYER_LEVEL_UP"} + events = {"PLAYER_LEVEL_UP"}, + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "group_leader", @@ -953,56 +1006,84 @@ Private.load_prototype = { test = "WeakAuras.CheckGroupMemberType(%s, group_leader)", optional = true, }, + { + name ="locationTitle", + display = L["Location"], + type = "description", + }, { name = "zone", display = L["Zone Name"], type = "string", + multiline = true, init = "arg", - test = "WeakAuras.CheckString(%q, zone)", - events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE"}, - desc = L["Supports multiple entries, separated by commas"] + preamble = "local zoneChecker = WeakAuras.ParseStringCheck(%q)", + test = "zoneChecker:Check(zone)", + events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, + desc = function() + return ("\n|cffffd200%s|r%s\n\n%s"):format(L["Current Zone\n"], GetRealZoneText(), L["Supports multiple entries, separated by commas"]) + end, + optional = true, }, { name = "zoneId", display = L["Zone ID(s)"], type = "string", + multiline = true, init = "arg", test = "WeakAuras.CheckNumericIds(%q, zoneId)", - events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE"}, + events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, desc = function() return ("\n|cffffd200%s|r%s: %d\n\n%s"):format(L["Current Zone\n"], GetRealZoneText(), GetCurrentMapAreaID(), L["Supports multiple entries, separated by commas"]) - end + end, + optional = true, }, { name = "subzone", display = L["Subzone Name"], type = "string", + multiline = true, init = "arg", - test = "WeakAuras.CheckString(%q, subzone)", - events = { "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE" }, - desc = L["Supports multiple entries, separated by commas"] + preamble = "local subzoneChecker = WeakAuras.ParseStringCheck(%q)", + test = "subzoneChecker:Check(subzone)", + events = { "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "VEHICLE_UPDATE", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, + desc = function() + return ("\n|cffffd200%s|r%s\n\n%s"):format(L["Current Zone\n"], GetMinimapZoneText(), L["Supports multiple entries, separated by commas"]) + end, + optional = true, }, { name = "size", display = L["Instance Size Type"], type = "multiselect", values = "instance_types", + sorted = true, init = "arg", - control = "WeakAurasSortedDropdown", - events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"} + events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, + optional = true, }, { name = "difficulty", display = L["Instance Difficulty"], type = "multiselect", values = "difficulty_types", + sorted = true, init = "arg", - events = {"PLAYER_DIFFICULTY_CHANGED", "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"} + events = {"PLAYER_DIFFICULTY_CHANGED", "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", "WA_DELAYED_PLAYER_ENTERING_WORLD" }, + optional = true, + }, + { + name ="equipmentTitle", + display = L["Equipment"], + type = "description", }, { name = "itemequiped", display = L["Item Equipped"], type = "item", + multiEntry = { + operator = "or" + }, test = "IsEquippedItem(%s)", events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"} }, @@ -1010,6 +1091,9 @@ Private.load_prototype = { name = "not_itemequiped", display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Item Equipped"], type = "item", + multiEntry = { + operator = "or" + }, test = "not IsEquippedItem(%s)", events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"} }, @@ -1298,6 +1382,7 @@ Private.event_prototypes = { display = L["Unit Name/Realm"], desc = constants.nameRealmFilterDesc, type = "string", + multiline = true, preamble = "local nameRealmChecker = WeakAuras.ParseNameCheck(%q)", test = "nameRealmChecker:Check(name, realm)", conditionType = "string", @@ -1410,12 +1495,17 @@ Private.event_prototypes = { type = "number", init = "UnitLevel(unit)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "npcId", display = L["Npc ID"], type = "string", + multiline = true, store = true, init = "tostring(tonumber(string.sub(UnitGUID(unit) or '', 8, 12), 16) or '')", conditionType = "string", @@ -1496,6 +1586,10 @@ Private.event_prototypes = { store = true, init = [[UnitLevel("player")]], conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "currentXP", @@ -1504,6 +1598,10 @@ Private.event_prototypes = { store = true, init = [[UnitXP("player")]], conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "totalXP", @@ -1512,6 +1610,10 @@ Private.event_prototypes = { store = true, init = [[UnitXPMax("player")]], conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "value", @@ -1542,7 +1644,16 @@ Private.event_prototypes = { type = "number", init = "total ~= 0 and (value / total) * 100 or nil", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + type = "header", + name = "restedExperienceHeader", + display = L["Rested Experience"], }, { name = "showRested", @@ -1558,6 +1669,10 @@ Private.event_prototypes = { type = "number", store = true, conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "percentrested", @@ -1566,6 +1681,10 @@ Private.event_prototypes = { type = "number", store = true, conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, }, overlayFuncs = { @@ -1639,7 +1758,11 @@ Private.event_prototypes = { type = "number", init = "UnitHealth(unit)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "value", @@ -1668,7 +1791,11 @@ Private.event_prototypes = { type = "number", init = "total ~= 0 and (value / total) * 100 or nil", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "deficit", @@ -1676,7 +1803,23 @@ Private.event_prototypes = { type = "number", init = "total - value", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + name = "maxhealth", + display = WeakAuras.newFeatureString .. L["Max Health"], + type = "number", + init = "total", + store = true, + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "name", @@ -1694,10 +1837,16 @@ Private.event_prototypes = { hidden = true, test = "true" }, + { + type = "header", + name = "unitCharacteristicsHeader", + display = L["Unit Characteristics"], + }, { name = "namerealm", display = L["Unit Name/Realm"], type = "string", + multiline = true, preamble = "local nameRealmChecker = WeakAuras.ParseNameCheck(%q)", test = "nameRealmChecker:Check(name, realm)", conditionType = "string", @@ -1714,6 +1863,7 @@ Private.event_prototypes = { name = "npcId", display = L["Npc ID"], type = "string", + multiline = true, store = true, init = "tostring(tonumber(string.sub(UnitGUID(unit) or '', 8, 12), 16) or '')", conditionType = "string", @@ -1769,6 +1919,14 @@ Private.event_prototypes = { test = "true", init = "raidMarkIndex > 0 and '{rt'..raidMarkIndex..'}' or ''" }, + { + type = "header", + name = "miscellaneousHeader", + display = L["Miscellaneous"], + enable = function(trigger) + return trigger.unit == "nameplate" or trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" + end, + }, { name = "includePets", display = WeakAuras.newFeatureString .. L["Include Pets"], @@ -1930,6 +2088,10 @@ Private.event_prototypes = { init = "UnitPower(unit, powerType)", store = true, conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "value", @@ -1965,7 +2127,11 @@ Private.event_prototypes = { type = "number", init = "total ~= 0 and (value / total) * 100 or nil", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "deficit", @@ -1973,7 +2139,23 @@ Private.event_prototypes = { type = "number", init = "total - value", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + name = "maxpower", + display = WeakAuras.newFeatureString .. L["Max Power"], + type = "number", + init = "total", + store = true, + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "name", @@ -1991,10 +2173,16 @@ Private.event_prototypes = { hidden = true, test = "true" }, + { + type = "header", + name = "unitCharacteristicsHeader", + display = L["Unit Characteristics"], + }, { name = "namerealm", display = L["Unit Name/Realm"], type = "string", + multiline = true, preamble = "local nameRealmChecker = WeakAuras.ParseNameCheck(%q)", test = "nameRealmChecker:Check(name, realm)", conditionType = "string", @@ -2011,6 +2199,7 @@ Private.event_prototypes = { name = "npcId", display = L["Npc ID"], type = "string", + multiline = true, store = true, init = "tostring(tonumber(string.sub(UnitGUID(unit) or '', 8, 12), 16) or '')", conditionType = "string", @@ -2066,6 +2255,14 @@ Private.event_prototypes = { test = "true", init = "raidMarkIndex > 0 and '{rt'..raidMarkIndex..'}' or ''" }, + { + type = "header", + name = "miscellaneousHeader", + display = L["Miscellaneous"], + enable = function(trigger) + return trigger.unit == "nameplate" or trigger.unit == "group" or trigger.unit == "raid" or trigger.unit == "party" + end, + }, { name = "includePets", display = WeakAuras.newFeatureString .. L["Include Pets"], @@ -2139,6 +2336,11 @@ Private.event_prototypes = { args = { {}, -- timestamp ignored with _ argument {}, -- messageType ignored with _ argument (it is checked before the dynamic function) + { + type = "header", + name = "sourceHeader", + display = L["Source Info"], + }, { name = "sourceGUID", init = "arg", @@ -2166,15 +2368,32 @@ Private.event_prototypes = { name = "sourceName", display = L["Source Name"], type = "string", + multiline = true, init = "arg", store = true, - conditionType = "string" + conditionType = "string", + preamble = "local sourceNameChecker = WeakAuras.ParseStringCheck(%q)", + test = "sourceNameChecker:Check(sourceName)", + desc = L["Supports multiple entries, separated by commas"], }, { name = "sourceNpcId", display = L["Source NPC Id"], type = "string", - test = "tostring(tonumber(string.sub(sourceGUID or '', 8, 12), 16) or '') == %q", + multiline = true, + init = "tostring(tonumber(string.sub(sourceGUID or '', 8, 12), 16) or '')", + store = true, + conditionType = "string", + preamble = "local sourceNpcIdChecker = WeakAuras.ParseStringCheck(%q)", + test = "sourceNpcIdChecker:Check(sourceNpcId)", + conditionPreamble = function(input) + return WeakAuras.ParseStringCheck(input) + end, + conditionTest = function(state, needle, op, preamble) + return preamble:Check(state.sourceNpcId) + end, + operator_types = "none", + desc = L["Supports multiple entries, separated by commas"], enable = function(trigger) return not (trigger.subeventPrefix == "ENVIRONMENTAL") end, @@ -2214,6 +2433,14 @@ Private.event_prototypes = { return state and state.show and WeakAuras.CheckCombatLogFlagsObjectType(state.sourceFlags, needle); end }, + { + type = "header", + name = "destHeader", + display = L["Destination Info"], + enable = function(trigger) + return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); + end, + }, { name = "destGUID", init = "arg", @@ -2241,18 +2468,35 @@ Private.event_prototypes = { name = "destName", display = L["Destination Name"], type = "string", + multiline = true, init = "arg", + store = true, + conditionType = "string", + preamble = "local destNameChecker = WeakAuras.ParseStringCheck(%q)", + test = "destNameChecker:Check(destName)", + desc = L["Supports multiple entries, separated by commas"], enable = function(trigger) return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); end, - store = true, - conditionType = "string" }, { name = "destNpcId", display = L["Destination NPC Id"], type = "string", - test = "tostring(tonumber(string.sub(destGUID or '', 8, 12), 16) or '') == %q", + multiline = true, + init = "tostring(tonumber(string.sub(destGUID or '', 8, 12), 16) or '')", + store = true, + conditionType = "string", + preamble = "local destNpcIdChecker = WeakAuras.ParseStringCheck(%q)", + test = "destNpcIdChecker:Check(destNpcId)", + conditionPreamble = function(input) + return WeakAuras.ParseStringCheck(input) + end, + conditionTest = function(state, needle, op, preamble) + return preamble:Check(state.destNpcId) + end, + operator_types = "none", + desc = L["Supports multiple entries, separated by commas"], enable = function(trigger) return not (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); end, @@ -2311,26 +2555,76 @@ Private.event_prototypes = { return (trigger.subeventPrefix == "SPELL" and trigger.subeventSuffix == "_CAST_START"); end, }, + { + type = "header", + name = "subeventHeader", + display = L["Subevent Info"], + enable = function(trigger) + return trigger.subeventPrefix and ( + trigger.subeventPrefix == "RANGE" + or trigger.subeventPrefix == "ENVIRONMENTAL" + or trigger.subeventPrefix:find("DAMAGE") + or trigger.subeventPrefix:find("SPELL")) + + or trigger.subeventSuffix and ( + trigger.subeventSuffix == "_ABSORBED" + or trigger.subeventSuffix == "_INTERRUPT" + or trigger.subeventSuffix == "_DISPEL" + or trigger.subeventSuffix == "_DISPEL_FAILED" + or trigger.subeventSuffix == "_STOLEN" + or trigger.subeventSuffix == "_AURA_BROKEN_SPELL" + or trigger.subeventSuffix == "_DAMAGE" + or trigger.subeventSuffix == "_HEAL" + or trigger.subeventSuffix == "_ENERGIZE" + or trigger.subeventSuffix == "_DRAIN" + or trigger.subeventSuffix == "_LEECH" + or trigger.subeventSuffix == "_DAMAGE" + or trigger.subeventSuffix == "_MISSED" + or trigger.subeventSuffix == "_EXTRA_ATTACKS" + or trigger.subeventSuffix == "_CAST_FAILED" + or trigger.subeventSuffix:find("DOSE") + or trigger.subeventSuffix:find("AURA")) + end, + }, { name = "spellId", display = L["Spell Id"], - type = "string", init = "arg", enable = function(trigger) return trigger.subeventPrefix and (trigger.subeventPrefix:find("SPELL") or trigger.subeventPrefix == "RANGE" or trigger.subeventPrefix:find("DAMAGE")) end, store = true, - conditionType = "number" + preambleGroup = "spell", + preamble = "local spellChecker = WeakAuras.CreateSpellChecker()", + multiEntry = { + operator = "preamble", + preambleAdd = "spellChecker:AddExact(%q)" + }, + test = "spellChecker:Check(spellId)", + testGroup = "spell", + conditionType = "number", + type = "spell", + showExactOption = false, + noProgressSource = true }, { name = "spellName", display = L["Spell Name"], - type = "string", + type = "spell", + --noValidation = true, init = "arg", enable = function(trigger) return trigger.subeventPrefix and (trigger.subeventPrefix:find("SPELL") or trigger.subeventPrefix == "RANGE" or trigger.subeventPrefix:find("DAMAGE")) end, store = true, + preambleGroup = "spell", + preamble = "local spellChecker = WeakAuras.CreateSpellChecker()", + multiEntry = { + operator = "preamble", + preambleAdd = "spellChecker:AddName(%q)" + }, + test = "spellChecker:Check(spellId)", + testGroup = "spell", conditionType = "string" }, { @@ -2338,9 +2632,9 @@ Private.event_prototypes = { display = WeakAuras.newFeatureString .. L["Spell School"], type = "select", values = "combatlog_spell_school_types_for_ui", + sorted = true, test = "spellSchool == %d", init = "arg", - control = "WeakAurasSortedDropdown", conditionType = "select", store = true, enable = function(trigger) @@ -2552,6 +2846,11 @@ Private.event_prototypes = { return trigger.subeventSuffix == "_CAST_FAILED" end }, -- failedType ignored with _ argument - theoretically this is not necessary because it is the last argument in the event, but it is added here for completeness + { + type = "header", + name = "miscellaneousHeader", + display = L["Miscellaneous"], + }, { name = "cloneId", display = L["Clone per Event"], @@ -3603,7 +3902,7 @@ Private.event_prototypes = { return ret:format( trigger.use_id and trigger.id or "", - trigger.use_spellId and trigger.spellId or "", + trigger.use_spellId and tostring(trigger.spellId) or "", trigger.use_message and trigger.message or "", trigger.use_message and trigger.message_operator or "", trigger.use_cloneId and "true" or "false", @@ -3834,7 +4133,7 @@ Private.event_prototypes = { end ]=] return ret:format( - trigger.use_spellId and trigger.spellId or "", + trigger.use_spellId and tostring(trigger.spellId) or "", trigger.use_text and trigger.text or "", trigger.use_text and trigger.text_operator or "", trigger.use_cloneId and "true" or "false", @@ -4844,8 +5143,8 @@ Private.event_prototypes = { display = L["Message Type"], type = "select", values = "chat_message_types", + sorted = true, test = "event == %q", - control = "WeakAurasSortedDropdown" }, { name = "message", @@ -5282,6 +5581,10 @@ Private.event_prototypes = { store = true, conditionType = "number", enable = function(trigger) return trigger.threatUnit ~= "none" end, + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "rawthreatpct", @@ -5291,6 +5594,10 @@ Private.event_prototypes = { store = true, conditionType = "number", enable = function(trigger) return trigger.threatUnit ~= "none" end, + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "threatvalue", @@ -5300,6 +5607,10 @@ Private.event_prototypes = { store = true, conditionType = "number", enable = function(trigger) return trigger.threatUnit ~= "none" end, + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "value", @@ -5450,22 +5761,51 @@ Private.event_prototypes = { store = true }, { - name = "spell", - display = L["Spell Name"], - type = "string", + name = "spellNames", + display = L["Name(s)"], + type = "spell", enable = function(trigger) return not trigger.use_inverse end, - conditionType = "string", - store = true, + preambleGroup = "spell", + preamble = "local spellChecker = WeakAuras.CreateSpellChecker()", + multiEntry = { + operator = "preamble", + preambleAdd = "spellChecker:AddName(%q)" + }, + test = "spellChecker:Check(spellId)", + testGroup = "spell", + --noValidation = true, + }, + { + name = "spellIds", + display = L["Exact Spell ID(s)"], + type = "spell", + enable = function(trigger) return not trigger.use_inverse end, + preambleGroup = "spell", + preamble = "local spellChecker = WeakAuras.CreateSpellChecker()", + multiEntry = { + operator = "preamble", + preambleAdd = "spellChecker:AddExact(%q)" + }, + test = "spellChecker:Check(spellId)", + testGroup = "spell", }, { name = "spellId", - display = L["Spell Id"], - type = "spell", - enable = function(trigger) return not trigger.use_inverse end, + display = L["Spell ID"], conditionType = "number", - forceExactOption = true, - test = "GetSpellInfo(%s) == spell", store = true, + test = "true", + hidden = true, + noProgressSource = true + }, + { + name = "spell", + display = L["Spellname"], + type = "string", + conditionType = "string", + store = true, + test = "true", + hidden = true }, { name = "castType", @@ -5539,10 +5879,16 @@ Private.event_prototypes = { test = "true", store = true }, + { + type = "header", + name = "unitCharacteristicsHeader", + display = L["Unit Characteristics"], + }, { name = "npcId", display = L["Npc ID"], type = "string", + multiline = true, store = true, init = "tostring(tonumber(string.sub(UnitGUID(unit) or '', 8, 12), 16) or '')", conditionType = "string", @@ -5647,6 +5993,7 @@ Private.event_prototypes = { name = "sourceNameRealm", display = L["Source Unit Name/Realm"], type = "string", + multiline = true, preamble = "local sourceNameRealmChecker = WeakAuras.ParseNameCheck(%q)", test = "sourceNameRealmChecker:Check(sourceName, sourceRealm)", conditionType = "string", @@ -5695,6 +6042,7 @@ Private.event_prototypes = { name = "destNameRealm", display = L["Name/Realm of Caster's Target"], type = "string", + multiline = true, preamble = "local destNameRealmChecker = WeakAuras.ParseNameCheck(%q)", test = "destNameRealmChecker:Check(destName, destRealm)", conditionType = "string", @@ -5708,6 +6056,11 @@ Private.event_prototypes = { enable = function(trigger) return not trigger.use_inverse end, desc = constants.nameRealmFilterDesc, }, + { + type = "header", + name = "miscellaneousHeader", + display = L["Miscellaneous"], + }, { name = "showLatency", display = L["Overlay Latency"], @@ -5802,13 +6155,22 @@ Private.event_prototypes = { force_events = "CONDITIONS_CHECK", statesParameter = "one", args = { + { + type = "header", + name = "primaryStatsHeader", + display = L["Primary Stats"], + }, { name = "strength", display = L["Strength"], type = "number", init = "UnitStat('player', 1)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "agility", @@ -5816,7 +6178,11 @@ Private.event_prototypes = { type = "number", init = "UnitStat('player', 2)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "stamina", @@ -5824,7 +6190,11 @@ Private.event_prototypes = { type = "number", init = "UnitStat('player', 3)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "intellect", @@ -5832,7 +6202,11 @@ Private.event_prototypes = { type = "number", init = "UnitStat('player', 4)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "spirit", @@ -5840,7 +6214,16 @@ Private.event_prototypes = { type = "number", init = "UnitStat('player', 5)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + type = "header", + name = "secondaryStatsHeader", + display = L["Secondary Stats"], }, { name = "meleecriticalrating", @@ -5849,6 +6232,10 @@ Private.event_prototypes = { init = "GetCombatRating(CR_CRIT_MELEE)", store = true, conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "rangedcriticalrating", @@ -5857,6 +6244,10 @@ Private.event_prototypes = { init = "GetCombatRating(CR_CRIT_RANGED)", store = true, conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "spellcriticalrating", @@ -5865,6 +6256,10 @@ Private.event_prototypes = { init = "GetCombatRating(CR_CRIT_SPELL)", store = true, conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "meleecriticalpercent", @@ -5872,7 +6267,11 @@ Private.event_prototypes = { type = "number", init = "GetCritChance()", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "rangedcriticalpercent", @@ -5880,7 +6279,11 @@ Private.event_prototypes = { type = "number", init = "GetRangedCritChance()", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "spellcriticalpercent", @@ -5888,7 +6291,11 @@ Private.event_prototypes = { type = "number", init = "WeakAuras.GetSpellCritChance()", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "meleehasterating", @@ -5896,7 +6303,11 @@ Private.event_prototypes = { type = "number", init = "GetCombatRating(CR_HASTE_MELEE)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "rangedhasterating", @@ -5904,7 +6315,11 @@ Private.event_prototypes = { type = "number", init = "GetCombatRating(CR_HASTE_RANGED)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "spellhasterating", @@ -5912,7 +6327,16 @@ Private.event_prototypes = { type = "number", init = "GetCombatRating(CR_HASTE_SPELL)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + type = "header", + name = "resistanceHeader", + display = L["Resistances"], }, { name = "resistancefire", @@ -5920,7 +6344,11 @@ Private.event_prototypes = { type = "number", init = "select(2, UnitResistance('player', 2))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "resistancenature", @@ -5928,7 +6356,11 @@ Private.event_prototypes = { type = "number", init = "select(2, UnitResistance('player', 3))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "resistancefrost", @@ -5936,7 +6368,11 @@ Private.event_prototypes = { type = "number", init = "select(2, UnitResistance('player', 4))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "resistanceshadow", @@ -5944,7 +6380,11 @@ Private.event_prototypes = { type = "number", init = "select(2, UnitResistance('player', 5))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "resistancearcane", @@ -5952,7 +6392,16 @@ Private.event_prototypes = { type = "number", init = "select(2, UnitResistance('player', 6))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + type = "header", + name = "tertiaryStatsHeader", + display = L["Tertiary Stats"], }, { name = "moveSpeed", @@ -5967,7 +6416,16 @@ Private.event_prototypes = { type = "number", init = "GetUnitSpeed('player') / 7 * 100", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, + }, + { + type = "header", + name = "defensiveStatsHeader", + display = L["Defensive Stats"], }, { name = "dodgerating", @@ -5975,7 +6433,11 @@ Private.event_prototypes = { type = "number", init = "GetCombatRating(CR_DODGE)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "dodgepercent", @@ -5983,7 +6445,11 @@ Private.event_prototypes = { type = "number", init = "GetDodgeChance()", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "parryrating", @@ -5991,7 +6457,11 @@ Private.event_prototypes = { type = "number", init = "GetCombatRating(CR_PARRY)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "parrypercent", @@ -5999,7 +6469,11 @@ Private.event_prototypes = { type = "number", init = "GetParryChance()", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "blockrating", @@ -6007,7 +6481,11 @@ Private.event_prototypes = { type = "number", init = "GetCombatRating(CR_BLOCK)", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "blockpercent", @@ -6015,7 +6493,11 @@ Private.event_prototypes = { type = "number", init = "GetBlockChance()", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "armorrating", @@ -6023,7 +6505,11 @@ Private.event_prototypes = { type = "number", init = "select(2, UnitArmor('player'))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, { name = "armorpercent", @@ -6031,7 +6517,11 @@ Private.event_prototypes = { type = "number", init = "PaperDollFrame_GetArmorReduction(select(2, UnitArmor('player')), UnitLevel('player'))", store = true, - conditionType = "number" + conditionType = "number", + multiEntry = { + operator = "and", + limit = 2 + }, }, }, automaticrequired = true @@ -6199,8 +6689,8 @@ Private.event_prototypes = { display = L["Instance Type"].." "..L["|cffff0000deprecated|r"], type = "multiselect", values = "instance_types", + sorted = true, init = "WeakAuras.InstanceType()", - control = "WeakAurasSortedDropdown", events = {"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"} }, { @@ -6467,7 +6957,8 @@ Private.event_prototypes = { "ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA", - "PLAYER_DIFFICULTY_CHANGED" + "PLAYER_DIFFICULTY_CHANGED", + "WA_DELAYED_PLAYER_ENTERING_WORLD", } }, internal_events = {"INSTANCE_LOCATION_CHECK"}, @@ -6491,6 +6982,7 @@ Private.event_prototypes = { return ("\n|cffffd200%s|r%s: %d\n\n%s"):format(L["Current Zone\n"], GetRealZoneText(), GetCurrentMapAreaID(), L["Supports multiple entries, separated by commas"]) end, type = "string", + multiline = true, preamble = "local zoneChecker = WeakAuras.ParseZoneCheck(%q)", test = "zoneChecker:Check(MapId)", conditionType = "string", @@ -6513,19 +7005,35 @@ Private.event_prototypes = { { name = "zone", display = L["Zone Name"], + desc = function() + return ("|cffffd200%s|r%s"):format(L["Current Zone\n"], GetRealZoneText()) + end, type = "string", conditionType = "string", store = true, init = "zoneText", + multiEntry = { + operator = "or", + } }, { name = "subzone", display = L["Subzone Name"], - desc = L["Name of the (sub-)zone currently shown above the minimap."], + desc = function() + return ("%s\n\n|cffffd200%s|r%s"):format(L["Name of the (sub-)zone currently shown above the minimap."], L["Current Zone\n"], GetMinimapZoneText()) + end, type = "string", conditionType = "string", store = true, init = "minimapZoneText", + multiEntry = { + operator = "or", + }, + }, + { + type = "header", + name = "instanceHeader", + display = L["Instance Info"], }, { name = "instance", @@ -6539,9 +7047,9 @@ Private.event_prototypes = { display = L["Instance Size Type"], type = "multiselect", values = "instance_types", + sorted = true, init = "WeakAuras.InstanceType()", conditionType = "select", - control = "WeakAurasSortedDropdown", store = true, }, { diff --git a/WeakAuras/Types.lua b/WeakAuras/Types.lua index 143d9a1..e1c8e7c 100644 --- a/WeakAuras/Types.lua +++ b/WeakAuras/Types.lua @@ -171,6 +171,7 @@ Private.format_types = { }) addOption(symbol .. "_abbreviate_max", { type = "range", + control = "WeakAurasSpinBox", name = L["Max Char "], width = WeakAuras.normalWidth, min = 1, @@ -206,6 +207,7 @@ Private.format_types = { addOption(symbol .. "_time_dynamic_threshold", { type = "range", + control = "WeakAurasSpinBox", min = 0, max = 60, step = 1, @@ -365,6 +367,7 @@ Private.format_types = { }) addOption(symbol .. "_abbreviate_max", { type = "range", + control = "WeakAurasSpinBox", name = L["Max Char "], width = WeakAuras.normalWidth, min = 1, @@ -492,6 +495,7 @@ Private.format_types = { }) addOption(symbol .. "_abbreviate_max", { type = "range", + control = "WeakAurasSpinBox", name = L["Max Char "], width = WeakAuras.normalWidth, min = 1, diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 2d7532d..c985e65 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1,6 +1,6 @@ local AddonName, Private = ... -local internalVersion = 52 +local internalVersion = 67 -- Lua APIs local insert = table.insert @@ -537,6 +537,147 @@ function Private.ParseNumber(numString) end end +local function EvalBooleanArg(arg, trigger, default) + if(type(arg) == "function") then + return arg(trigger); + elseif type(arg) == "boolean" then + return arg + elseif type(arg) == "nil" then + return default + end +end + +local function singleTest(arg, trigger, use, name, value, operator, use_exact, caseInsensitive) + local number = value and tonumber(value) or nil + if(arg.type == "tristate") then + if(use == false) then + return "(not "..name..")"; + elseif(use) then + if(arg.test) then + return "("..arg.test:format(value)..")"; + else + return name; + end + end + elseif(arg.type == "tristatestring") then + if(use == false) then + return "("..name.. "~=".. (number or string.format("%s", Private.QuotedString(value or ""))) .. ")" + elseif(use) then + return "("..name.. "==".. (number or string.format("%s", Private.QuotedString(value or ""))) .. ")" + end + elseif(arg.type == "multiselect") then + if arg.multiNoSingle then + -- convert single to multi + -- this is a lazy migration because multiNoSingle is not set for all game versions + if use == true then + trigger["use_"..name] = false + trigger[name] = trigger[name] or {} + trigger[name].multi = {}; + if trigger[name].single ~= nil then + trigger[name].multi[trigger[name].single] = true; + trigger[name].single = nil + end + end + end + if(use == false) then -- multi selection + local any = false; + if (value and value.multi) then + local test = "("; + for value, positive in pairs(value.multi) do + local arg1 = tonumber(value) or ("[["..value.."]]") + local arg2 + if arg.extraOption then + arg2 = trigger[name .. "_extraOption"] or 0 + elseif arg.multiTristate then + arg2 = positive and 4 or 5 + end + local testEnabled = true + if type(arg.enableTest) == "function" then + testEnabled = arg.enableTest(trigger, arg1, arg2) + end + if testEnabled then + local check + if not arg.test then + check = name.."=="..arg1 + else + check = arg.test:format(arg1, arg2) + end + if arg.multiAll then + test = test..check.." and " + else + test = test..check.." or " + end + any = true; + end + end + if(any) then + test = test:sub(1, -6); + else + test = "(false"; + end + test = test..")" + if arg.inverse then + if type(arg.inverse) == "boolean" then + test = "not " .. test + elseif type(arg.inverse) == "function" then + if arg.inverse(trigger) then + test = "not " .. test + end + end + end + return test + end + elseif(use) then -- single selection + local value = value and value.single or nil; + if not arg.test then + return value and "("..name.."=="..(tonumber(value) or ("[["..value.."]]"))..")"; + else + return value and "("..arg.test:format(tonumber(value) or ("[["..value.."]]"))..")"; + end + end + elseif(arg.type == "toggle") then + if(use) then + if(arg.test) then + return "("..arg.test:format(value)..")"; + else + return name; + end + end + elseif (arg.type == "spell") then + if arg.showExactOption then + return "("..arg.test:format(value, tostring(use_exact) or "false") ..")"; + else + return "("..arg.test:format(value)..")"; + end + elseif(arg.test) then + return "("..arg.test:format(value)..")"; + elseif(arg.type == "longstring" and operator) then + if(operator == "==") then + if caseInsensitive then + return ("(%s and %s:lower() == [[%s]]:lower())"):format(name, name, value) + else + return "("..name.."==[["..value.."]])"; + end + else + if caseInsensitive then + local op = operator:format(value:lower()) + return ("(%s:lower():%s)"):format(name, op) + else + return "("..name..":"..operator:format(value)..")"; + end + end + elseif(arg.type == "number") then + if number then + return "("..name..(operator or "==").. number ..")"; + end + else + if(type(value) == "table") then + value = "error"; + end + return "("..name..(operator or "==")..(number or ("[["..(value or "").."]]"))..")"; + end +end + -- Used for the load function, could be simplified a bit -- It used to be also used for the generic trigger system local function ConstructFunction(prototype, trigger, skipOptional) @@ -547,164 +688,108 @@ local function ConstructFunction(prototype, trigger, skipOptional) local events = {} local init; local preambles = "" + local orConjunctionGroups = {} if(prototype.init) then init = prototype.init(trigger); else init = ""; end for index, arg in pairs(prototype.args) do - local enable = arg.type ~= "collpase"; - if(type(arg.enable) == "function") then - enable = arg.enable(trigger); - elseif type(arg.enable) == "boolean" then - enable = arg.enable + local enable = EvalBooleanArg(arg.enable, trigger, true) + local init = arg.init + local name = arg.name; + if(arg.init == "arg") then + tinsert(input, name); end - if(enable) then - local name = arg.name; - if not(arg.name or arg.hidden) then - tinsert(input, "_"); - else - if(arg.init == "arg") then - tinsert(input, name); - end - if (arg.optional and skipOptional) then - -- Do nothing - elseif(arg.hidden or arg.type == "tristate" or arg.type == "toggle" or arg.type == "tristatestring" - or (arg.type == "multiselect" and trigger["use_"..name] ~= nil) - or ((trigger["use_"..name] or arg.required) and trigger[name])) then - if(arg.init and arg.init ~= "arg") then - init = init.."local "..name.." = "..arg.init.."\n"; - end - local number = trigger[name] and tonumber(trigger[name]); - local test; - if(arg.type == "tristate") then - if(trigger["use_"..name] == false) then - test = "(not "..name..")"; - elseif(trigger["use_"..name]) then - if(arg.test) then - test = "("..arg.test:format(trigger[name])..")"; - else - test = name; - end - end - elseif(arg.type == "tristatestring") then - if(trigger["use_"..name] == false) then - test = "("..name.. "~=".. (number or string.format("%s", Private.QuotedString(trigger[name] or ""))) .. ")" - elseif(trigger["use_"..name]) then - test = "("..name.. "==".. (number or string.format("%s", Private.QuotedString(trigger[name] or ""))) .. ")" - end - elseif(arg.type == "multiselect") then - if(trigger["use_"..name] == false) then -- multi selection - local any = false; - if (trigger[name] and trigger[name].multi) then - test = "("; - for value, _ in pairs(trigger[name].multi) do - if not arg.test then - test = test..name.."=="..(tonumber(value) or "[["..value.."]]").." or "; - else - if arg.extraOption then - test = test..arg.test:format(tonumber(value) or "[["..value.."]]", trigger[name .. "_extraOption"] or 0).." or "; - else - test = test..arg.test:format(tonumber(value) or "[["..value.."]]").." or "; - end - end - any = true; - end - if(any) then - test = test:sub(1, -5); - else - test = "(false"; - end - test = test..")" - if arg.inverse then - if type(arg.inverse) == "boolean" then - test = "not " .. test - elseif type(arg.inverse) == "function" then - if arg.inverse(trigger) then - test = "not " .. test - end - end - end - end - elseif(trigger["use_"..name]) then -- single selection - local value = trigger[name] and trigger[name].single; - if not arg.test then - test = trigger[name] and trigger[name].single and "("..name.."=="..(tonumber(value) or "[["..value.."]]")..")"; - else - test = trigger[name] and trigger[name].single and "("..arg.test:format(tonumber(value) or "[["..value.."]]")..")"; - end - end - elseif(arg.type == "toggle") then - if(trigger["use_"..name]) then - if(arg.test) then - test = "("..arg.test:format(trigger[name])..")"; - else - test = name; - end - end - elseif (arg.type == "spell") then - if arg.showExactOption then - test = "("..arg.test:format(trigger[name], tostring(trigger["use_exact_" .. name]) or "false") ..")"; - else - test = "("..arg.test:format(trigger[name])..")"; - end - elseif(arg.test) then - test = "("..arg.test:format(trigger[name])..")"; - elseif(arg.type == "longstring" and trigger[name.."_operator"]) then - if(trigger[name.."_operator"] == "==") then - test = "("..name.."==[["..trigger[name].."]])"; - else - test = "("..name..":"..trigger[name.."_operator"]:format(trigger[name])..")"; - end - elseif(arg.type == "number") then - if number then - test = "("..name..(trigger[name.."_operator"] or "==").. number ..")"; - end - else - if(type(trigger[name]) == "table") then - trigger[name] = "error"; - end - test = "("..name..(trigger[name.."_operator"] or "==")..(number or "[["..(trigger[name] or "").."]]")..")"; - end - if (arg.preamble) then - preambles = preambles .. arg.preamble:format(trigger[name]) .. "\n" - end - if test ~= "(test)" then - if(arg.required) then - tinsert(required, test); + if(enable) then + if (arg.optional and skipOptional) then + -- Do nothing + elseif arg.type == "tristate" + or arg.type == "toggle" + or arg.type == "tristatestring" + or (arg.type == "multiselect" and trigger["use_"..name] ~= nil) + or ((trigger["use_"..name] or arg.required) and trigger[name]) + then + local test; + + if arg.multiEntry then + if type(trigger[name]) == "table" and #trigger[name] > 0 then + test = "" + for i, value in ipairs(trigger[name]) do + local operator = name and type(trigger[name.."_operator"]) == "table" and trigger[name.."_operator"][i] + local caseInsensitive = name and arg.canBeCaseInsensitive and type(trigger[name.."_caseInsensitive"]) == "table" and trigger[name.."_caseInsensitive"][i] + local use_exact = name and type(trigger["use_exact_" .. name]) == "table" and trigger["use_exact_" .. name][i] + local use = name and trigger["use_"..name] + local single = singleTest(arg, trigger, use, name, value, operator, use_exact, caseInsensitive) + if single then + if test ~= "" then + test = test .. arg.multiEntry.operator + end + test = test .. single + end + end + if test == "" then + test = nil + else + test = "(" .. test .. ")" + end + end + else + local value = trigger[name] + local operator = name and trigger[name.."_operator"] + local caseInsensitive = name and trigger[name.."_caseInsensitive"] + local use_exact = name and trigger["use_exact_" .. name] + local use = name and trigger["use_"..name] + test = singleTest(arg, trigger, use, name, value, operator, use_exact, caseInsensitive) + end + + if (arg.preamble) then + preambles = preambles .. arg.preamble:format(trigger[name]) .. "\n" + end + + if test ~= "(test)" then + if(arg.required) then + tinsert(required, test); + elseif test ~= nil then + if arg.orConjunctionGroup then + orConjunctionGroups[arg.orConjunctionGroup ] = orConjunctionGroups[arg.orConjunctionGroup ] or {} + tinsert(orConjunctionGroups[arg.orConjunctionGroup ], test) else tinsert(tests, test); end end + end - if test and arg.events then - for index, event in ipairs(arg.events) do - events[event] = true - end + if test and arg.events then + for index, event in ipairs(arg.events) do + events[event] = true end + end - if(arg.debug) then - tinsert(debug, arg.debug:format(trigger[name])); - end + if(arg.debug) then + tinsert(debug, arg.debug:format(trigger[name])); end end end end - local ret = preambles .. "return function("..table.concat(input, ", ")..")\n"; - ret = ret..(init or ""); - ret = ret..(#debug > 0 and table.concat(debug, "\n") or ""); - ret = ret.."if("; - ret = ret..((#required > 0) and table.concat(required, " and ").." and " or ""); - ret = ret..(#tests > 0 and table.concat(tests, " and ") or "true"); - ret = ret..") then\n"; - if(#debug > 0) then - ret = ret.."print('ret: true');\n"; + for _, orConjunctionGroup in pairs(orConjunctionGroups) do + tinsert(tests, "("..table.concat(orConjunctionGroup , " or ")..")") end - ret = ret.."return true else return false end end"; + local ret = {preambles .. "return function("..table.concat(input, ", ")..")\n"}; + table.insert(ret, (init or "")); + table.insert(ret, (#debug > 0 and table.concat(debug, "\n") or "")); + table.insert(ret, "if("); + table.insert(ret, ((#required > 0) and table.concat(required, " and ").." and " or "")); + table.insert(ret, (#tests > 0 and table.concat(tests, " and ") or "true")); + table.insert(ret, ") then\n"); + if(#debug > 0) then + table.insert(ret, "print('ret: true');\n"); + end + table.insert(ret, "return true else return false end end"); - return ret, events; + return table.concat(ret), events; end function WeakAuras.GetActiveConditions(id, cloneId) @@ -4846,6 +4931,37 @@ function WeakAuras.IsAuraLoaded(id) return Private.loaded[id] end +function WeakAuras.CreateSpellChecker() + local matcher = { + names = {}, + spellIds = {}, + AddName = function(self, name) + local spellId = tonumber(name) + if spellId then + name = GetSpellInfo(spellId) + if name then + self.names[name] = true + end + else + self.names[name] = true + end + end, + AddExact = function(self, spellId) + spellId = tonumber(spellId) + self.spellIds[spellId] = true + end, + Check = function(self, spellId) + if spellId then + return self.spellIds[spellId] or self.names[GetSpellInfo(spellId)] + end + end, + CheckName = function(self, name) + return self.names[name] + end + } + return matcher +end + function Private.IconSources(data) local values = { [-1] = L["Dynamic Information"], @@ -4874,6 +4990,28 @@ function WeakAuras.GetTriggerCategoryFor(triggerType) return prototype and prototype.type end +function Private.SortOrderForValues(values) + local sortOrder = {} + for key, value in pairs(values) do + tinsert(sortOrder, key) + end + table.sort(sortOrder, function(aKey, bKey) + local aValue = values[aKey] + local bValue = values[bKey] + + if aValue:sub(1, #WeakAuras.newFeatureString) == WeakAuras.newFeatureString then + aValue = aValue:sub(#WeakAuras.newFeatureString + 1) + end + + if bValue:sub(1, #WeakAuras.newFeatureString) == WeakAuras.newFeatureString then + bValue = bValue:sub(#WeakAuras.newFeatureString + 1) + end + + return aValue < bValue + end) + return sortOrder +end + do local function shouldInclude(data, includeGroups, includeLeafs) if data.controlledChildren then diff --git a/WeakAuras/WeakAuras.toc b/WeakAuras/WeakAuras.toc index 1950ed0..a51b178 100644 --- a/WeakAuras/WeakAuras.toc +++ b/WeakAuras/WeakAuras.toc @@ -1,7 +1,7 @@ ## Interface: 30300 ## Title: WeakAuras ## Author: The WeakAuras Team -## Version: 4.1.0 +## Version: 4.1.1 ## Notes: A powerful, comprehensive utility for displaying graphics and information based on buffs, debuffs, and other triggers. ## Notes-esES: Potente y completa aplicación que te permitirá mostrar por pantalla múltiples diseños, basados en beneficios, perjuicios y otros activadores. ## Notes-deDE: Ein leistungsfähiges, umfassendes Addon zur grafischen Darstellung von Informationen von Auren, Cooldowns, Timern und vielem mehr. diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua new file mode 100644 index 0000000..ef21408 --- /dev/null +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasAnchorButtons.lua @@ -0,0 +1,135 @@ +if not WeakAuras.IsCorrectVersion() then return end + +local Type, Version = "WeakAurasAnchorButtons", 2 +local AceGUI = LibStub and LibStub("AceGUI-3.0", true) +if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end + +local directions = { "TOPLEFT", "TOP", "TOPRIGHT", "LEFT", "CENTER", "RIGHT", "BOTTOMLEFT", "BOTTOM", "BOTTOMRIGHT" } +local buttonSize = 10 +local frameWidth = 100 +local frameHeight = 50 +local titleHeight = 15 + +local methods = { + ["OnAcquire"] = function(self) + self:SetWidth(frameWidth + buttonSize) + self:SetHeight(frameHeight + buttonSize + titleHeight + 2) + self:SetDisabled(false) + end, + + ["SetValue"] = function(self, text) + if not tContains(directions, text) then return end + for direction, button in pairs(self.buttons) do + if direction == text then + button.tex:SetVertexColor(0.9, 0.9, 0, 1) + else + button.tex:SetVertexColor(0.3, 0.3, 0.3, 1) + end + button:SetNormalTexture(button.tex) + end + self.value = text + end, + + ["GetValue"] = function(self) + return self.value + end, + + ["SetLabel"] = function(self, text) + if text and text ~= "" then + self.label:SetText(text); + self.label:Show() + else + self.label:SetText("") + self.label:Hide() + end + end, + + ["SetList"] = function() end, + + ["SetDisabled"] = function(self, disabled) + self.disabled = disabled + if disabled then + self.label:SetTextColor(0.5,0.5,0.5) + for _, button in pairs(self.buttons) do + button:EnableMouse(false) + end + else + self.label:SetTextColor(1,.82,0) + for _, button in pairs(self.buttons) do + button:EnableMouse(true) + end + end + end, +} + +local function buttonClicked(self) + AceGUI:ClearFocus() + local frame = self:GetParent() + local widget = frame.obj + widget:SetValue(self.value) + widget:Fire("OnValueChanged", self.value) +end + +local function Constructor() + local name = "WeakAurasAnchorButtons" .. AceGUI:GetNextWidgetNum(Type) + local frame = CreateFrame("Frame", name, UIParent) + frame:SetSize(frameWidth, frameHeight) + frame:SetFrameStrata("FULLSCREEN_DIALOG") + + local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall"); + label:SetHeight(titleHeight); + label:SetJustifyH("CENTER"); + label:SetPoint("TOP", frame, "TOP"); + + local background = CreateFrame("Frame", nil, frame) + background:SetSize(frameWidth, frameHeight) + background:SetPoint("TOP", frame, "TOP", 0, -(titleHeight + 4)) + background:SetBackdrop({ + bgFile = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite.tga", + edgeFile = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite.tga", + tile = true, + tileEdge = true, + --tileSize = 8, + edgeSize = 2 + --insets = { left = 1, right = 1, top = 1, bottom = 1 }, + }) + background:SetBackdropColor(0.2,0.2,0.2,0.5) + background:SetBackdropBorderColor(1,1,1,0.6) + + local buttons = {} + for _, direction in ipairs(directions) do + local button = CreateFrame("Button", nil, frame) + button:SetSize(buttonSize, buttonSize) + button:SetPoint( + "CENTER", + background, + direction + ) + + local buttonTex = button:CreateTexture() + buttonTex:SetAllPoints() + buttonTex:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_FullWhite.tga") + buttonTex:SetVertexColor(0.3, 0.3, 0.3, 1) + button:SetNormalTexture(buttonTex) + button.tex = buttonTex + button.value = direction + + button:SetScript("OnClick", buttonClicked) + buttons[direction] = button + end + + --- @type table + local widget = { + frame = frame, + type = Type, + buttons = buttons, + label = label + } + for method, func in pairs(methods) do + widget[method] = func + end + + return AceGUI:RegisterAsWidget(widget); +end + +AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua new file mode 100644 index 0000000..a510470 --- /dev/null +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasInputFocus.lua @@ -0,0 +1,43 @@ +--[[----------------------------------------------------------------------------- +Input Widget that allows to show an alternative text when it does not have focus +-------------------------------------------------------------------------------]] +if not WeakAuras.IsCorrectVersion() then return end + +local Type, Version = "WeakAurasInputFocus", 1 +local AceGUI = LibStub and LibStub("AceGUI-3.0", true) +if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end + +local OnEditFocusGained = function(self) + local textWithFocus = self.obj.textWithFocus + if textWithFocus and self:GetText() == self.obj.textWithoutFocus then + self:SetText(textWithFocus) + end + AceGUI:SetFocus(self.obj) +end + + +local function Constructor() + local button = AceGUI:Create("EditBox") + button.type = Type + + button.editbox:SetScript("OnEditFocusGained", OnEditFocusGained) + + local oldSetText = button.SetText + button.SetText = function(self, text) + text = text or "" + local pos = string.find(text, "\0", nil, true) + if pos then + self.textWithoutFocus = text:sub(1, pos -1) + self.textWithFocus = text:sub(pos + 1) + oldSetText(self, self.textWithoutFocus) + else + self.textWithFocus = nil + self.textWithoutFocus = nil + oldSetText(self, text) + end + end + + return button +end + +AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua new file mode 100644 index 0000000..5714a10 --- /dev/null +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua @@ -0,0 +1,379 @@ +if not WeakAuras.IsCorrectVersion() then return end + +-- based on the AceGUI widget, overwrites the enter handling +local Type, Version = "WeakAuras-MultiLineEditBoxWithEnter", 1 +local AceGUI = LibStub and LibStub("AceGUI-3.0", true) +if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end + +-- Lua APIs +local pairs = pairs + +-- WoW APIs +local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor +local CreateFrame, UIParent = CreateFrame, UIParent +local _G = _G + +--[[----------------------------------------------------------------------------- +Support functions +-------------------------------------------------------------------------------]] + +if not AceGUIWeakAurasMultiLineEditBoxWithEnterInsertLink then + -- upgradeable hook + hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIWeakAurasMultiLineEditBoxWithEnterInsertLink(...) end) +end + +function _G.AceGUIWeakAurasMultiLineEditBoxWithEnterInsertLink(text) + for i = 1, AceGUI:GetWidgetCount(Type) do + local editbox = _G[("MultiLineEditBox%uEdit"):format(i)] + if editbox and editbox:IsVisible() and editbox:HasFocus() then + editbox:Insert(text) + return true + end + end +end + + +local function Layout(self) + self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight) + + if self.labelHeight == 0 then + self.scrollBar:SetPoint("TOP", self.frame, "TOP", 0, -23) + else + self.scrollBar:SetPoint("TOP", self.label, "BOTTOM", 0, -19) + end + + if self.disablebutton then + self.scrollBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 21) + self.scrollBG:SetPoint("BOTTOMLEFT", 0, 4) + else + self.scrollBar:SetPoint("BOTTOM", self.button, "TOP", 0, 18) + self.scrollBG:SetPoint("BOTTOMLEFT", self.button, "TOPLEFT") + end +end + +--[[----------------------------------------------------------------------------- +Scripts +-------------------------------------------------------------------------------]] +local function OnEnterPressed(self) -- EditBox + self:HighlightText(0, 0) + self.obj:Fire("OnEnterPressed", self:GetText()) +end + + +local function OnClick(self) -- Button + self = self.obj + self.editBox:ClearFocus() + if not self:Fire("OnEnterPressed", self.editBox:GetText()) then + self.button:Disable() + end +end + +local function OnCursorChanged(self, _, y, _, cursorHeight) -- EditBox + self, y = self.obj.scrollFrame, -y + local offset = self:GetVerticalScroll() + if y < offset then + self:SetVerticalScroll(y) + else + y = y + cursorHeight - self:GetHeight() + if y > offset then + self:SetVerticalScroll(y) + end + end +end + +local function OnEditFocusLost(self) -- EditBox + self:HighlightText(0, 0) + self.obj:Fire("OnEditFocusLost") +end + +local function OnEnter(self) -- EditBox / ScrollFrame + self = self.obj + if not self.entered then + self.entered = true + self:Fire("OnEnter") + end +end + +local function OnLeave(self) -- EditBox / ScrollFrame + self = self.obj + if self.entered then + self.entered = nil + self:Fire("OnLeave") + end +end + +local function OnMouseUp(self) -- ScrollFrame + self = self.obj.editBox + self:SetFocus() + self:SetCursorPosition(self:GetNumLetters()) +end + +local function OnReceiveDrag(self) -- EditBox / ScrollFrame + local type, id, info = GetCursorInfo() + if type == "spell" then + info = GetSpellInfo(id, info) + elseif type ~= "item" then + return + end + ClearCursor() + self = self.obj + local editBox = self.editBox + if not editBox:HasFocus() then + editBox:SetFocus() + editBox:SetCursorPosition(editBox:GetNumLetters()) + end + editBox:Insert(info) + self.button:Enable() +end + +local function OnSizeChanged(self, width, height) -- ScrollFrame + self.obj.editBox:SetWidth(width) +end + +local function OnTextChanged(self, userInput) -- EditBox + if userInput then + self = self.obj + self:Fire("OnTextChanged", self.editBox:GetText()) + self.button:Enable() + end +end + +local function OnTextSet(self) -- EditBox + self:HighlightText(0, 0) + self:SetCursorPosition(self:GetNumLetters()) + self:SetCursorPosition(0) + self.obj.button:Disable() +end + +local function OnVerticalScroll(self, offset) -- ScrollFrame + local editBox = self.obj.editBox + editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight()) +end + +local function OnScrollRangeChanged(self, xrange, yrange) + if yrange == 0 then + self.obj.editBox:SetHitRectInsets(0, 0, 0, 0) + else + OnVerticalScroll(self, self:GetVerticalScroll()) + end +end + +local function OnShowFocus(frame) + frame.obj.editBox:SetFocus() + frame:SetScript("OnShow", nil) +end + +local function OnEditFocusGained(frame) + AceGUI:SetFocus(frame.obj) + frame.obj:Fire("OnEditFocusGained") +end + +--[[----------------------------------------------------------------------------- +Methods +-------------------------------------------------------------------------------]] +local methods = { + ["OnAcquire"] = function(self) + self.editBox:SetText("") + self:SetDisabled(false) + self:SetWidth(200) + self:DisableButton(false) + self:SetNumLines() + self.entered = nil + self:SetMaxLetters(0) + end, + + ["OnRelease"] = function(self) + self:ClearFocus() + end, + + ["SetDisabled"] = function(self, disabled) + local editBox = self.editBox + if disabled then + editBox:ClearFocus() + editBox:EnableMouse(false) + editBox:SetTextColor(0.5, 0.5, 0.5) + self.label:SetTextColor(0.5, 0.5, 0.5) + self.scrollFrame:EnableMouse(false) + self.button:Disable() + else + editBox:EnableMouse(true) + editBox:SetTextColor(1, 1, 1) + self.label:SetTextColor(1, 0.82, 0) + self.scrollFrame:EnableMouse(true) + end + end, + + ["SetLabel"] = function(self, text) + if text and text ~= "" then + self.label:SetText(text) + if self.labelHeight ~= 10 then + self.labelHeight = 10 + self.label:Show() + end + elseif self.labelHeight ~= 0 then + self.labelHeight = 0 + self.label:Hide() + end + Layout(self) + end, + + ["SetNumLines"] = function(self, value) + if not value or value < 4 then + value = 4 + end + self.numlines = value + Layout(self) + end, + + ["SetText"] = function(self, text) + self.editBox:SetText(text) + end, + + ["GetText"] = function(self) + return self.editBox:GetText() + end, + + ["SetMaxLetters"] = function (self, num) + self.editBox:SetMaxLetters(num or 0) + end, + + ["DisableButton"] = function(self, disabled) + self.disablebutton = disabled + if disabled then + self.button:Hide() + else + self.button:Show() + end + Layout(self) + end, + + ["ClearFocus"] = function(self) + self.editBox:ClearFocus() + self.frame:SetScript("OnShow", nil) + end, + + ["SetFocus"] = function(self) + self.editBox:SetFocus() + if not self.frame:IsShown() then + self.frame:SetScript("OnShow", OnShowFocus) + end + end, + + ["HighlightText"] = function(self, from, to) + self.editBox:HighlightText(from, to) + end, + + ["GetCursorPosition"] = function(self) + return self.editBox:GetCursorPosition() + end, + + ["SetCursorPosition"] = function(self, ...) + return self.editBox:SetCursorPosition(...) + end, +} + +--[[----------------------------------------------------------------------------- +Constructor +-------------------------------------------------------------------------------]] +local backdrop = { + bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], + edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 16, + insets = { left = 4, right = 3, top = 4, bottom = 3 } +} + +local function Constructor() + local frame = CreateFrame("Frame", nil, UIParent) + frame:Hide() + + local widgetNum = AceGUI:GetNextWidgetNum(Type) + + local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall") + label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4) + label:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -4) + label:SetJustifyH("LEFT") + label:SetText(ACCEPT) + label:SetHeight(10) + + local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate") + button:SetPoint("BOTTOMLEFT", 0, 4) + button:SetHeight(22) + button:SetWidth(label:GetStringWidth() + 24) + button:SetText(ACCEPT) + button:SetScript("OnClick", OnClick) + button:Disable() + + local text = button:GetFontString() + text:ClearAllPoints() + text:SetPoint("TOPLEFT", button, "TOPLEFT", 5, -5) + text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1) + text:SetJustifyV("MIDDLE") + + local scrollBG = CreateFrame("Frame", nil, frame) + scrollBG:SetBackdrop(backdrop) + scrollBG:SetBackdropColor(0, 0, 0) + scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4) + + local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum), frame, "UIPanelScrollFrameTemplate") + + local scrollBar = _G[scrollFrame:GetName() .. "ScrollBar"] + scrollBar:ClearAllPoints() + scrollBar:SetPoint("TOP", label, "BOTTOM", 0, -19) + scrollBar:SetPoint("BOTTOM", button, "TOP", 0, 18) + scrollBar:SetPoint("RIGHT", frame, "RIGHT") + + scrollBG:SetPoint("TOPRIGHT", scrollBar, "TOPLEFT", 0, 19) + scrollBG:SetPoint("BOTTOMLEFT", button, "TOPLEFT") + + scrollFrame:SetPoint("TOPLEFT", scrollBG, "TOPLEFT", 5, -6) + scrollFrame:SetPoint("BOTTOMRIGHT", scrollBG, "BOTTOMRIGHT", -4, 4) + scrollFrame:SetScript("OnEnter", OnEnter) + scrollFrame:SetScript("OnLeave", OnLeave) + scrollFrame:SetScript("OnMouseUp", OnMouseUp) + scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag) + scrollFrame:SetScript("OnSizeChanged", OnSizeChanged) + scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll) + scrollFrame:HookScript("OnScrollRangeChanged", OnScrollRangeChanged) + + local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame) + editBox:SetAllPoints() + editBox:SetFontObject(ChatFontNormal) + editBox:SetMultiLine(true) + editBox:EnableMouse(true) + editBox:SetAutoFocus(false) + editBox:SetCountInvisibleLetters(false) + editBox:SetScript("OnCursorChanged", OnCursorChanged) + editBox:SetScript("OnEditFocusLost", OnEditFocusLost) + editBox:SetScript("OnEnter", OnEnter) + editBox:SetScript("OnEscapePressed", editBox.ClearFocus) + editBox:SetScript("OnLeave", OnLeave) + editBox:SetScript("OnMouseDown", OnReceiveDrag) + editBox:SetScript("OnReceiveDrag", OnReceiveDrag) + editBox:SetScript("OnTextChanged", OnTextChanged) + editBox:SetScript("OnTextSet", OnTextSet) + editBox:SetScript("OnEditFocusGained", OnEditFocusGained) + editBox:SetScript("OnEnterPressed", OnEnterPressed) + + + scrollFrame:SetScrollChild(editBox) + + local widget = { + button = button, + editBox = editBox, + frame = frame, + label = label, + labelHeight = 10, + numlines = 4, + scrollBar = scrollBar, + scrollBG = scrollBG, + scrollFrame = scrollFrame, + type = Type + } + for method, func in pairs(methods) do + widget[method] = func + end + button.obj, editBox.obj, scrollFrame.obj = widget, widget, widget + + return AceGUI:RegisterAsWidget(widget) +end + +AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSortedDropDown.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSortedDropDown.lua deleted file mode 100644 index e4e6e14..0000000 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSortedDropDown.lua +++ /dev/null @@ -1,42 +0,0 @@ -if not WeakAuras.IsCorrectVersion() then return end - -local Type, Version = "WeakAurasSortedDropdown", 1 -local AceGUI = LibStub and LibStub("AceGUI-3.0", true) -if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end - -local function Constructor() - local DropDownConstructor = AceGUI.WidgetRegistry["Dropdown"]; - if (not DropDownConstructor) then - return nil; - end - local widget = DropDownConstructor(); - if (not widget) then - return nil; - end - - local oldSetList = widget.SetList - widget.SetList = function(self, list, _, itemType) - local orderTable = {}; - for k, v in pairs(list) do - tinsert(orderTable, { key = k, value = v }); - end - - local order = {}; - - table.sort(orderTable, function(a, b) - return a.value < b.value; - end); - - for i, item in ipairs(orderTable) do - order[i] = item.key; - end - - oldSetList(self, list, order, itemType) - end - - widget.type = Type; - - return widget; -end - -AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua new file mode 100644 index 0000000..28f2153 --- /dev/null +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasSpinBox.lua @@ -0,0 +1,374 @@ +--[[----------------------------------------------------------------------------- +Spin Box Widget +-------------------------------------------------------------------------------]] +local Type, Version = "WeakAurasSpinBox", 5 +local AceGUI = LibStub and LibStub("AceGUI-3.0", true) +if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then + return +end + +-- Lua APIs +local math_min, math_max, floor = math.min, math.max, math.floor +local tonumber, pairs = tonumber, pairs + +-- WoW APIs +local PlaySound = PlaySound +local CreateFrame, UIParent = CreateFrame, UIParent + +local progressLeftOffset = -3 +local progressExtraWidth = -0 +local progressTopOffset = -2 +local progressBottomOffset = 2 + +--[[----------------------------------------------------------------------------- +Support functions +-------------------------------------------------------------------------------]] +local function UpdateText(self) + local value = self:GetValue() or 0 + if self.ispercent then + self.editbox:SetText(("%s%%"):format(floor(value * 1000 + 0.5) / 10)) + else + self.editbox:SetText(floor(value * 100 + 0.5) / 100) + end +end + +local function UpdateButtons(self) + local value = self:GetValue() or 0 + + if value > self.min then + self.leftbutton:Enable() + else + self.leftbutton:Disable() + end + + if value < self.max then + self.rightbutton:Enable() + else + self.rightbutton:Disable() + end +end + +local function UpdateProgressBar(self) + local value = self:GetValue() or 0 + local p = 0 + if self.min and self.max then + if self.min < self.max then + p = (value - self.min) / (self.max - self.min) + end + end + p = Clamp(p, 0, 1) + local w = p * (self.frame:GetWidth() - 45 + progressExtraWidth) + self.progressBar:SetWidth(max(w, 1)) + self.progressBar:SetTexCoord(0, p , 0, 1) +end + +local function UpdateHandleColor(self) + if self.progressBarHandle.mouseDown then + self.progressBarHandleTexture:SetVertexColor(0.6, 0.6, 0, 1) + --self.progressBarHandleTexture:SetColorTexture(0.6, 0.6, 0, 1) + elseif MouseIsOver(self.progressBarHandle) then + self.progressBarHandleTexture:SetVertexColor(0.8, 0.8, 0, 1) + --self.progressBarHandleTexture:SetColorTexture(0.8, 0.8, 0, 1) + else + self.progressBarHandleTexture:SetVertexColor(0.4, 0.4, 0, 1) + --self.progressBarHandleTexture:SetColorTexture(0.4, 0.4, 0, 1) + end +end + +local function UpdateHandleVisibility(self) + if MouseIsOver(self.frame) then + self.progressBarHandle:Show() + UpdateHandleColor(self) + else + self.progressBarHandle:Hide() + end +end + +--[[----------------------------------------------------------------------------- +Scripts +-------------------------------------------------------------------------------]] +local function SpinBox_OnValueDown(frame) + local self = frame.obj + --self.editbox:SetFocus() + local value = self.value or 0 + local step = self.step or 1 + value = math_max(self.min, value - step) + PlaySound("igMainMenuOptionCheckBoxOn") + self:SetValue(value, true) +end + +local function SpinBox_OnValueUp(frame) + local self = frame.obj + --self.editbox:SetFocus() + local value = self.value or 0 + local step = self.step or 1 + value = math_min(self.max, value + step) + PlaySound("igMainMenuOptionCheckBoxOn") + self:SetValue(value, true) +end + +local function EditBox_OnEscapePressed(frame) + frame:ClearFocus() +end + +local function EditBox_OnEnterPressed(frame) + local self = frame.obj + local value = frame:GetText() + if self.ispercent then + value = value:gsub("%%", "") + value = tonumber(value) / 100 + else + value = tonumber(value) + end + + if value then + PlaySound("igMainMenuOptionCheckBoxOn") + self:SetValue(value, true) + end + frame:ClearFocus() +end + +local function EditBox_OnEnter(frame) + frame.onEntered = true + if not frame.obj.progressBarHandle.mouseDown then + frame.obj:Fire("OnEnter") + end +end + +local function EditBox_OnLeave(frame) + if frame.onEntered then + frame.obj:Fire("OnLeave") + end + frame.onEntered = false +end + +local function Frame_OnEnter(frame) + UpdateHandleVisibility(frame.obj) +end + +local function ProgressBarHandle_OnUpdate(frame, elapsed) + UpdateHandleColor(frame.obj) + if not IsMouseButtonDown("LeftButton") then + if frame.mouseDown then + frame.obj:SetValue(frame.obj:GetValue(), true) + frame.mouseDown = false + end + end + if frame.mouseDown then + frame.timeElapsed = frame.timeElapsed + elapsed + if frame.timeElapsed > 0.1 then + local currentX = GetCursorPosition() + local deltaX = currentX - frame.startX + deltaX = deltaX / frame.obj.editbox:GetEffectiveScale() + + local p = deltaX / (frame.obj.frame:GetWidth() - 45 + progressExtraWidth) + local delta = p * (frame.obj.max - frame.obj.min) + local step = frame.obj.step + local v = frame.originalValue + delta + v = v - v % step + v = Clamp(v, frame.obj.min, frame.obj.max) + frame.obj:SetValue(v, false) + frame.timeElapsed = 0 + end + else + UpdateHandleVisibility(frame.obj) + end +end + +local function ProgressBarHandle_OnMouseDown(frame, button) + if button ~= "LeftButton" then + return + end + frame.startX = GetCursorPosition() + frame.originalValue = frame.obj:GetValue() + frame.timeElapsed = 0 + frame.mouseDown = true +end + +--[[----------------------------------------------------------------------------- +Methods +-------------------------------------------------------------------------------]] +local methods = { + ["OnAcquire"] = function(self) + self:SetWidth(200) + self:SetHeight(44) + self:SetDisabled(false) + self:SetIsPercent(nil) + self:SetSpinBoxValues(0, 100, 1) + self:SetValue(0) + self.progressOpacity = 0 + end, + + ["OnRelease"] = function(self) + self:ClearFocus() + end, + + ["OnWidthSet"] = function(self, width) + UpdateProgressBar(self) + end, + + ["SetDisabled"] = function(self, disabled) + self.disabled = disabled + if disabled then + self.label:SetTextColor(0.5, 0.5, 0.5) + self.editbox:SetTextColor(0.5, 0.5, 0.5) + self.editbox:EnableMouse(false) + self.editbox:ClearFocus() + self.leftbutton:Disable() + self.rightbutton:Disable() + else + self.label:SetTextColor(1, 0.82, 0) + self.editbox:SetTextColor(1, 1, 1) + self.editbox:EnableMouse(true) + end + end, + + ["SetValue"] = function(self, value, reload) + self.value = value + UpdateText(self) + UpdateButtons(self) + UpdateProgressBar(self) + -- In AceOptions the range is treated differently from other widget types + -- Whereas for other widgets OnValueChanged leads to a reload, this is done only + -- on OnMouseUp for ranges. (Probably to not reload the options while dragging) + if reload then + self:Fire("OnMouseUp", value) + else + self:Fire("OnValueChanged", value) + end + end, + + ["GetValue"] = function(self) + return self.value + end, + + ["SetLabel"] = function(self, text) + self.label:SetText(text) + end, + + ["SetSliderValues"] = function(self, ...) + self:SetSpinBoxValues(...) + end, + + ["SetSpinBoxValues"] = function(self, min, max, step) + self.min = min or 0 + self.max = max or 100 + self.step = step or 1 + UpdateButtons(self) + UpdateProgressBar(self) + end, + + ["SetIsPercent"] = function(self, value) + self.ispercent = value + UpdateText(self) + end, + + ["ClearFocus"] = function(self) + self.editbox:ClearFocus() + end, + + ["SetFocus"] = function(self) + self.editbox:SetFocus() + self.progressBarHandle:Hide() + end, +} + +--[[----------------------------------------------------------------------------- +Constructor +-------------------------------------------------------------------------------]] +local function Constructor() + local widgetName = ("%s%d"):format(Type, AceGUI:GetNextWidgetNum(Type)) -- Needs a name for 3.3.5 (InputBoxTemplate ($parent)) + + local frame = CreateFrame("Frame", widgetName, UIParent) + frame:SetScript("OnEnter", Frame_OnEnter) + + local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall") + label:SetPoint("TOPLEFT") + label:SetPoint("TOPRIGHT") + label:SetJustifyH("LEFT") + label:SetHeight(18) + + local leftbutton = CreateFrame("Button", nil, frame) + leftbutton:SetSize(16, 16) + leftbutton:SetNormalTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxleft") + leftbutton:SetHighlightTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxlefth") + leftbutton:SetPushedTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxleftp") + leftbutton:SetDisabledTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxleftp") + leftbutton:SetScript("OnClick", SpinBox_OnValueDown) + + local rightbutton = CreateFrame("Button", nil, frame) + rightbutton:SetSize(16, 16) + rightbutton:SetNormalTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxright") + rightbutton:SetHighlightTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxrighth") + rightbutton:SetPushedTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxrightp") + rightbutton:SetDisabledTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxrightp") + rightbutton:SetScript("OnClick", SpinBox_OnValueUp) + + local editbox = CreateFrame("EditBox", nil, frame, "InputBoxTemplate") + editbox:SetAutoFocus(false) + editbox:SetFontObject(ChatFontNormal) + editbox:SetHeight(19) + editbox:SetJustifyH("CENTER") + editbox:EnableMouse(true) + editbox:EnableMouseWheel(false) + editbox:SetTextInsets(0, 0, 3, 3) + editbox:SetScript("OnEnter", EditBox_OnEnter) + editbox:SetScript("OnLeave", EditBox_OnLeave) + editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed) + editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed) + editbox:SetScript("OnEditFocusGained", function(frame) + AceGUI:SetFocus(frame.obj) + UpdateHandleVisibility(frame.obj) + end) + editbox:SetScript("OnEditFocusLost", function(frame) + UpdateHandleVisibility(frame.obj) + end) + + leftbutton:SetPoint("TOPLEFT", 2, -18) + rightbutton:SetPoint("TOPRIGHT", -2, -18) + editbox:SetPoint("LEFT", leftbutton, "RIGHT", 8, 0) + editbox:SetPoint("RIGHT", rightbutton, "LEFT", -2, 0) + + local progressBar = editbox:CreateTexture(nil, "ARTWORK", nil) + progressBar:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\spinboxoverlay") + progressBar:SetVertexColor(0.50, 0.50, 0.50, 1) + progressBar:SetPoint("TOPLEFT", editbox, "TOPLEFT", progressLeftOffset, progressTopOffset) + progressBar:SetPoint("BOTTOMLEFT", editbox, "BOTTOMLEFT", progressLeftOffset, progressBottomOffset) + progressBar:SetWidth(0) + + local progressBarHandle = CreateFrame("Frame", nil, editbox) + progressBarHandle:SetPoint("TOP", progressBar, "TOP", 0, 2) + progressBarHandle:SetPoint("BOTTOM", progressBar, "BOTTOM", 0, -2) + progressBarHandle:SetPoint("LEFT", progressBar, "RIGHT", -4, 0) + progressBarHandle:SetPoint("RIGHT", progressBar, "RIGHT", 4, 0) + progressBarHandle:EnableMouse(true) + progressBarHandle:Hide() + progressBarHandle:SetScript("OnMouseDown", ProgressBarHandle_OnMouseDown) + progressBarHandle:SetScript("OnUpdate", ProgressBarHandle_OnUpdate) + + local progressBarHandleTexture = progressBarHandle:CreateTexture(nil, "ARTWORK") + progressBarHandleTexture:SetTexture("Interface\\AddOns\\WeakAuras\\Media\\Textures\\Square_White") + progressBarHandleTexture:SetVertexColor(0.8, 0.8, 0, 0.8) + progressBarHandleTexture:SetPoint("TOPLEFT", progressBarHandle, "TOPLEFT", 2, -2) + progressBarHandleTexture:SetPoint("BOTTOMRIGHT", progressBarHandle, "BOTTOMRIGHT", -2, 2) + + local widget = { + label = label, + editbox = editbox, + leftbutton = leftbutton, + rightbutton = rightbutton, + progressBar = progressBar, + progressBarHandle = progressBarHandle, + progressBarHandleTexture = progressBarHandleTexture, + type = Type, + frame = frame, + } + for method, func in pairs(methods) do + widget[method] = func + end + editbox.obj, leftbutton.obj, rightbutton.obj, frame.obj, progressBarHandle.obj = widget, widget, widget, widget, widget + + return AceGUI:RegisterAsWidget(widget) +end + +AceGUI:RegisterWidgetType(Type, Constructor, Version) diff --git a/WeakAurasOptions/ActionOptions.lua b/WeakAurasOptions/ActionOptions.lua index 895ad74..d71efb6 100644 --- a/WeakAurasOptions/ActionOptions.lua +++ b/WeakAurasOptions/ActionOptions.lua @@ -102,8 +102,8 @@ function OptionsPrivate.GetActionOptions(data) name = L["Message Type"], order = 2, values = OptionsPrivate.Private.send_chat_message_types, + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.send_chat_message_types), disabled = function() return not data.actions.start.do_message end, - control = "WeakAurasSortedDropdown" }, start_message_warning = { type = "description", @@ -188,6 +188,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_sound_repeat = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Repeat After"], order = 8.2, @@ -209,8 +210,8 @@ function OptionsPrivate.GetActionOptions(data) name = L["Sound"], order = 8.4, values = OptionsPrivate.Private.sound_types, + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.sound_types), disabled = function() return not data.actions.start.do_sound end, - control = "WeakAurasSortedDropdown" }, start_sound_channel = { type = "select", @@ -344,6 +345,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_lines = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Lines & Particles"], order = 10.81, @@ -363,6 +365,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_frequency = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Frequency"], order = 10.82, @@ -382,6 +385,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_length = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Length"], order = 10.83, @@ -400,6 +404,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_thickness = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Thickness"], order = 10.84, @@ -418,6 +423,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_XOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X-Offset"], order = 10.85, @@ -434,6 +440,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_YOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y-Offset"], order = 10.86, @@ -450,6 +457,7 @@ function OptionsPrivate.GetActionOptions(data) }, start_glow_scale = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Scale"], order = 10.87, @@ -503,8 +511,8 @@ function OptionsPrivate.GetActionOptions(data) name = L["Message Type"], order = 22, values = OptionsPrivate.Private.send_chat_message_types, + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.send_chat_message_types), disabled = function() return not data.actions.finish.do_message end, - control = "WeakAurasSortedDropdown" }, finish_message_warning = { type = "description", @@ -583,8 +591,8 @@ function OptionsPrivate.GetActionOptions(data) name = L["Sound"], order = 28.1, values = OptionsPrivate.Private.sound_types, + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.sound_types), disabled = function() return not data.actions.finish.do_sound end, - control = "WeakAurasSortedDropdown" }, finish_sound_channel = { type = "select", @@ -721,6 +729,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_lines = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Lines & Particles"], order = 30.81, @@ -740,6 +749,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_frequency = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Frequency"], order = 30.82, @@ -759,6 +769,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_length = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Length"], order = 30.83, @@ -777,6 +788,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_thickness = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Thickness"], order = 30.84, @@ -795,6 +807,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_XOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X-Offset"], order = 30.85, @@ -811,6 +824,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_YOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y-Offset"], order = 30.86, @@ -827,6 +841,7 @@ function OptionsPrivate.GetActionOptions(data) }, finish_glow_scale = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Scale"], order = 30.87, diff --git a/WeakAurasOptions/AnimationOptions.lua b/WeakAurasOptions/AnimationOptions.lua index 0bf8867..d1f8a7c 100644 --- a/WeakAurasOptions/AnimationOptions.lua +++ b/WeakAurasOptions/AnimationOptions.lua @@ -189,6 +189,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, start_easeStrength = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Ease Strength"], order = 33.8, @@ -216,6 +217,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- text editor added below start_alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.doubleWidth, name = L["Alpha"], order = 36, @@ -243,6 +245,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below start_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Offset"], order = 40, @@ -254,6 +257,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, start_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], order = 41, @@ -285,6 +289,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below start_scalex = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Scale"], order = 44, @@ -296,6 +301,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, start_scaley = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Scale"], order = 45, @@ -323,6 +329,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below start_rotate = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.doubleWidth, name = L["Angle"], order = 48, @@ -438,6 +445,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, main_easeStrength = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Ease Strength"], order = 53.8, @@ -465,6 +473,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below main_alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.doubleWidth, name = L["Alpha"], order = 56, @@ -492,6 +501,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below main_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Offset"], order = 60, @@ -503,6 +513,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, main_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], order = 61, @@ -530,6 +541,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below main_scalex = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Scale"], order = 64, @@ -541,6 +553,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, main_scaley = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Scale"], order = 65, @@ -568,6 +581,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- text editor added below main_rotate = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.doubleWidth, name = L["Angle"], order = 68, @@ -660,6 +674,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, finish_easeStrength = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Ease Strength"], order = 73.8, @@ -687,6 +702,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below finish_alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.doubleWidth, name = L["Alpha"], order = 76, @@ -714,6 +730,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below finish_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Offset"], order = 80, @@ -725,6 +742,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, finish_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], order = 81, @@ -752,6 +770,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below finish_scalex = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Scale"], order = 84, @@ -763,6 +782,7 @@ function OptionsPrivate.GetAnimationOptions(data) }, finish_scaley = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Scale"], order = 85, @@ -790,6 +810,7 @@ function OptionsPrivate.GetAnimationOptions(data) -- texteditor added below finish_rotate = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.doubleWidth, name = L["Angle"], order = 88, diff --git a/WeakAurasOptions/AuthorOptions.lua b/WeakAurasOptions/AuthorOptions.lua index 29efae0..11d52fe 100644 --- a/WeakAurasOptions/AuthorOptions.lua +++ b/WeakAurasOptions/AuthorOptions.lua @@ -606,6 +606,7 @@ typeControlAdders = { } args[prefix .. "length"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = name(option, "length", L["Length"]), desc = desc(option, "length"), @@ -682,6 +683,7 @@ typeControlAdders = { step = option.step args[prefix .. "default"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = name(option, "default", L["Default"]), desc = desc(option, "default"), @@ -948,6 +950,7 @@ typeControlAdders = { args[prefix .. "height"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, order = order(), name = name(option, "height", L["Height"]), @@ -1202,6 +1205,7 @@ typeControlAdders = { } args[prefix .. "size"] = { type = "range", + control = "WeakAurasSpinBox", name = name(option, "limitType", option.limitType == "max" and L["Entry limit"] or L["Number of Entries"]), desc = desc(option, "limitType"), order = order(), @@ -1848,6 +1852,7 @@ function addAuthorModeOption(options, args, data, order, prefix, i) args[prefix .. "width"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = name(option, "width", L["Width"]), desc = desc(option, "width"), diff --git a/WeakAurasOptions/BuffTrigger2.lua b/WeakAurasOptions/BuffTrigger2.lua index 1c7a51a..0bd8d34 100644 --- a/WeakAurasOptions/BuffTrigger2.lua +++ b/WeakAurasOptions/BuffTrigger2.lua @@ -170,7 +170,19 @@ local function CreateNameOptions(aura_options, data, trigger, size, isExactSpell desc = desc, order = baseOrder + i / 100 + 0.0003, hidden = hiddenFunction, - get = function(info) return trigger[optionKey] and trigger[optionKey][i] end, + get = function(info) + local rawString = trigger[optionKey] and trigger[optionKey][i] + if not rawString then return "" end + local spellID = WeakAuras.SafeToNumber(rawString) + local spellName = spellID and GetSpellInfo(spellID) + if spellName and spellID then + return ("%s (%s)"):format(spellID, spellName) .. "\0" .. rawString + elseif spellID then + return ("%s (%s)"):format(rawString, L["Unknown Spell"]) .. "\0" .. rawString + else + return rawString .. "\0" .. rawString + end + end, set = function(info, v) trigger[optionKey] = trigger[optionKey] or {} if v == "" then @@ -179,10 +191,9 @@ local function CreateNameOptions(aura_options, data, trigger, size, isExactSpell if isExactSpellId then trigger[optionKey][i] = v else - local spellId = tonumber(v) + local _, spellId = WeakAuras.spellCache.CorrectAuraName(v) if spellId then - WeakAuras.spellCache.CorrectAuraName(v) - trigger[optionKey][i] = v + trigger[optionKey][i] = tostring(spellId) else trigger[optionKey][i] = spellCache.BestKeyMatch(v) end @@ -193,7 +204,8 @@ local function CreateNameOptions(aura_options, data, trigger, size, isExactSpell WeakAuras.UpdateThumbnail(data) WeakAuras.ClearAndUpdateOptions(data.id) end, - validate = isExactSpellId and WeakAuras.ValidateNumeric or nil + validate = isExactSpellId and WeakAuras.ValidateNumeric or nil, + control = "WeakAurasInputFocus", } end -- VALIDATE ? diff --git a/WeakAurasOptions/Cache.lua b/WeakAurasOptions/Cache.lua index 120e454..ef13e10 100644 --- a/WeakAurasOptions/Cache.lua +++ b/WeakAurasOptions/Cache.lua @@ -212,14 +212,17 @@ function spellCache.CorrectAuraName(input) error("spellCache has not been loaded. Call WeakAuras.spellCache.Load(...) first.") end - local spellId = WeakAuras.SafeToNumber(input); + local spellId = WeakAuras.SafeToNumber(input) + if type(input) == "string" and input:find("|", nil, true) then + spellId = WeakAuras.SafeToNumber(input:match("|Hspell:(%d+)")) + end if(spellId) then local name, _, icon = GetSpellInfo(spellId); if(name) then spellCache.AddIcon(name, spellId, icon) return name, spellId; else - return "Invalid Spell ID"; + return "Invalid Spell ID", spellId; end else local ret = spellCache.BestKeyMatch(input); diff --git a/WeakAurasOptions/CommonOptions.lua b/WeakAurasOptions/CommonOptions.lua index b02f86d..b662690 100644 --- a/WeakAurasOptions/CommonOptions.lua +++ b/WeakAurasOptions/CommonOptions.lua @@ -949,11 +949,24 @@ local function CreateSetAll(subOption, getAll) if (childOption and not disabledOrHiddenChild(childOptionTable, info)) then for i=#childOptionTable,0,-1 do - if(childOptionTable[i].set) then - if (childOptionTable[i].type == "multiselect") then - childOptionTable[i].set(info, ..., not before); + local optionTable = childOptionTable[i] + if(optionTable.set) then + if (optionTable.type == "multiselect") then + local newValue + if optionTable.multiTristate then + if before == true then + newValue = false + elseif before == false then + newValue = nil + elseif before == nil then + newValue = true + end + else + newValue = not before + end + optionTable.set(info, ..., newValue) else - childOptionTable[i].set(info, ...); + optionTable.set(info, ...); end break; end @@ -1012,6 +1025,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g __order = metaOrder, width = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Width"], order = 60, @@ -1023,6 +1037,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g }, height = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Height"], order = 61, @@ -1032,62 +1047,44 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g bigStep = 1, hidden = hideWidthHeight, }, - xOffset = { - type = "range", - width = WeakAuras.normalWidth, - name = L["X Offset"], - order = 62, - softMin = (-1 * screenWidth), - min = (-4 * screenWidth), - softMax = screenWidth, - max = 4 * screenWidth, - bigStep = 10, - get = function() return data.xOffset end, - set = function(info, v) - data.xOffset = v; - WeakAuras.Add(data); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.ResetMoverSizer(); - OptionsPrivate.Private.AddParents(data) - end - }, - yOffset = { - type = "range", - width = WeakAuras.normalWidth, - name = L["Y Offset"], - order = 63, - softMin = (-1 * screenHeight), - min = (-4 * screenHeight), - softMax = screenHeight, - max = 4 * screenHeight, - bigStep = 10, - get = function() return data.yOffset end, - set = function(info, v) - data.yOffset = v; - WeakAuras.Add(data); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.ResetMoverSizer(); - OptionsPrivate.Private.AddParents(data) - end - }, - selfPoint = { - type = "select", - width = WeakAuras.normalWidth, - name = L["Anchor"], - order = 70, - hidden = IsParentDynamicGroup, - values = OptionsPrivate.Private.point_types, - disabled = disableSelfPoint, - }, anchorFrameType = { type = "select", width = WeakAuras.normalWidth, name = L["Anchored To"], - order = 72, + order = 70, hidden = function() return IsParentDynamicGroup() or IsGroupByFrame() end, - values = (data.regionType == "group" or data.regionType == "dynamicgroup") and OptionsPrivate.Private.anchor_frame_types_group or OptionsPrivate.Private.anchor_frame_types, + values = (data.regionType == "group" or data.regionType == "dynamicgroup") + and OptionsPrivate.Private.anchor_frame_types_group + or OptionsPrivate.Private.anchor_frame_types, + sorting = OptionsPrivate.Private.SortOrderForValues( + (data.regionType == "group" or data.regionType == "dynamicgroup") + and OptionsPrivate.Private.anchor_frame_types_group + or OptionsPrivate.Private.anchor_frame_types), + }, + anchorFrameParent = { + type = "toggle", + width = WeakAuras.normalWidth, + name = L["Set Parent to Anchor"], + desc = L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visibility and scale."], + order = 71, + get = function() + return data.anchorFrameParent or data.anchorFrameParent == nil; + end, + hidden = function() + return (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" or IsParentDynamicGroup()); + end, + }, + anchorFrameSpaceOne = { + type = "execute", + width = WeakAuras.normalWidth, + name = "", + order = 72, + image = function() return "", 0, 0 end, + hidden = function() + return IsParentDynamicGroup() or IsGroupByFrame() or not (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE") + end, }, -- Input field to select frame to anchor on anchorFrameFrame = { @@ -1107,7 +1104,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g type = "execute", width = WeakAuras.normalWidth, name = L["Choose"], - order = 72.4, + order = 74, hidden = function() if (IsParentDynamicGroup()) then return true; @@ -1118,6 +1115,16 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g OptionsPrivate.StartFrameChooser(data, {"anchorFrameFrame"}); end }, + selfPoint = { + type = "select", + width = WeakAuras.normalWidth, + name = L["Anchor"], + order = 75, + hidden = IsParentDynamicGroup, + values = OptionsPrivate.Private.point_types, + disabled = disableSelfPoint, + control = "WeakAurasAnchorButtons", + }, anchorPoint = { type = "select", width = WeakAuras.normalWidth, @@ -1130,7 +1137,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g return L["To Frame's"]; end end, - order = 75, + order = 76, hidden = function() if (data.parent) then if IsGroupByFrame() then @@ -1141,13 +1148,14 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g return data.anchorFrameType == "MOUSE"; end end, - values = OptionsPrivate.Private.point_types + values = OptionsPrivate.Private.point_types, + control = "WeakAurasAnchorButtons", }, anchorPointGroup = { type = "select", width = WeakAuras.normalWidth, name = L["To Group's"], - order = 76, + order = 77, hidden = function() if IsGroupByFrame() then return true @@ -1162,33 +1170,70 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g end, disabled = true, values = {["CENTER"] = L["Anchor Point"]}, - get = function() return "CENTER"; end + get = function() return "CENTER"; end, + control = "WeakAurasAnchorButtons", }, - anchorFrameParent = { - type = "toggle", - width = WeakAuras.normalWidth, - name = L["Set Parent to Anchor"], - desc = L["Sets the anchored frame as the aura's parent, causing the aura to inherit attributes such as visibility and scale."], - order = 77, - get = function() - return data.anchorFrameParent or data.anchorFrameParent == nil; - end, + anchorFramePoints = { + type = "execute", + name = "", + order = 78, + image = function() return "", 0, 0 end, hidden = function() - return (data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE" or IsParentDynamicGroup()); - end, + return not (data.anchorFrameType == "MOUSE") or IsParentDynamicGroup(); + end + }, + xOffset = { + type = "range", + control = "WeakAurasSpinBox", + width = WeakAuras.normalWidth, + name = L["X Offset"], + order = 79, + softMin = (-1 * screenWidth), + min = (-4 * screenWidth), + softMax = screenWidth, + max = 4 * screenWidth, + bigStep = 10, + get = function() return data.xOffset end, + set = function(info, v) + data.xOffset = v; + WeakAuras.Add(data); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.ResetMoverSizer(); + OptionsPrivate.Private.AddParents(data) + end + }, + yOffset = { + type = "range", + control = "WeakAurasSpinBox", + width = WeakAuras.normalWidth, + name = L["Y Offset"], + order = 80, + softMin = (-1 * screenHeight), + min = (-4 * screenHeight), + softMax = screenHeight, + max = 4 * screenHeight, + bigStep = 10, + get = function() return data.yOffset end, + set = function(info, v) + data.yOffset = v; + WeakAuras.Add(data); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.ResetMoverSizer(); + OptionsPrivate.Private.AddParents(data) + end }, frameStrata = { type = "select", width = WeakAuras.normalWidth, name = L["Frame Strata"], - order = 78, + order = 81, values = OptionsPrivate.Private.frame_strata_types }, anchorFrameSpace = { type = "execute", width = WeakAuras.normalWidth, name = "", - order = 79, + order = 82, image = function() return "", 0, 0 end, hidden = function() return not (data.anchorFrameType ~= "SCREEN" or IsParentDynamicGroup()); @@ -1197,7 +1242,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g }; OptionsPrivate.commonOptions.AddCodeOption(positionOptions, data, L["Custom Anchor"], "custom_anchor", "https://github.com/WeakAuras/WeakAuras2/wiki/Custom-Code-Blocks#custom-anchor-function", - 72.1, function() return not(data.anchorFrameType == "CUSTOM" and not IsParentDynamicGroup()) end, {"customAnchor"}, false, { setOnParent = group }) + 71.5, function() return not(data.anchorFrameType == "CUSTOM" and not IsParentDynamicGroup()) end, {"customAnchor"}, false, { setOnParent = group }) return positionOptions; end @@ -1236,6 +1281,7 @@ local function BorderOptions(id, data, showBackDropOptions, hiddenFunc, order) }, borderOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Border Offset"], order = order + 0.3, @@ -1246,6 +1292,7 @@ local function BorderOptions(id, data, showBackDropOptions, hiddenFunc, order) }, borderSize = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Border Size"], order = order + 0.4, @@ -1256,6 +1303,7 @@ local function BorderOptions(id, data, showBackDropOptions, hiddenFunc, order) }, borderInset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Border Inset"], order = order + 0.5, @@ -1443,6 +1491,7 @@ local function AddCommonTriggerOptions(options, data, triggernum, doubleWidth) desc = L["The type of trigger"], order = 1.1, values = trigger_types, + sorting = OptionsPrivate.Private.SortOrderForValues(trigger_types), get = function(info) return trigger.type end, @@ -1458,7 +1507,6 @@ local function AddCommonTriggerOptions(options, data, triggernum, doubleWidth) WeakAuras.UpdateThumbnail(data); WeakAuras.ClearAndUpdateOptions(data.id); end, - control = "WeakAurasSortedDropdown" } end diff --git a/WeakAurasOptions/ConditionOptions.lua b/WeakAurasOptions/ConditionOptions.lua index 19c26c3..a54964d 100644 --- a/WeakAurasOptions/ConditionOptions.lua +++ b/WeakAurasOptions/ConditionOptions.lua @@ -458,6 +458,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA local properties = allProperties.propertyMap[property]; if (properties.min or properties.softMin) and (properties.max or properties.softMax) then args["condition" .. i .. "value" .. j].type = "range"; + args["condition" .. i .. "value" .. j].control = "WeakAurasSpinBox" args["condition" .. i .. "value" .. j].min = properties.min; args["condition" .. i .. "value" .. j].softMin = properties.softMin; args["condition" .. i .. "value" .. j].max = properties.max; @@ -571,6 +572,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA type = "select", width = WeakAuras.normalWidth, values = OptionsPrivate.Private.sound_types, + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.sound_types), name = blueIfNoValue2(data, conditions[i].changes[j], "value", "sound", L["Differences"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "sound", propertyType, OptionsPrivate.Private.sound_types), order = order, @@ -578,7 +580,6 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.sound; end, set = wrapWithPlaySound(setValueComplex("sound")), - control = "WeakAurasSortedDropdown", hidden = function() return not (anySoundType("Play") or anySoundType("Loop")) end } order = order + 1; @@ -600,6 +601,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA args["condition" .. i .. "value" .. j .. "sound_repeat"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, min = 0, softMax = 60, @@ -674,6 +676,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA type = "select", width = WeakAuras.normalWidth, values = OptionsPrivate.Private.send_chat_message_types, + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.send_chat_message_types), name = blueIfNoValue2(data, conditions[i].changes[j], "value", "message_type", L["Differences"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "message_type", propertyType, OptionsPrivate.Private.send_chat_message_types), order = order, @@ -681,7 +684,6 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA return type(conditions[i].changes[j].value) == "table" and conditions[i].changes[j].value.message_type; end, set = setValueComplex("message_type"), - control = "WeakAurasSortedDropdown" } order = order + 1; @@ -1148,6 +1150,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_lines"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_lines", L["Lines & Particles"], L["Lines & Particles"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_lines", propertyType), @@ -1166,6 +1169,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_frequency"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_frequency", L["Frequency"], L["Frequency"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_frequency", propertyType), @@ -1184,6 +1188,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_length"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_length", L["Length"], L["Length"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_length", propertyType), @@ -1202,6 +1207,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_thickness"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_thickness", L["Thickness"], L["Thickness"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_thickness", propertyType), @@ -1220,6 +1226,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_XOffset"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_XOffset", L["X-Offset"], L["X-Offset"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_XOffset", propertyType), @@ -1238,6 +1245,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_YOffset"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_YOffset", L["Y-Offset"], L["Y-Offset"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_YOffset", propertyType), @@ -1256,6 +1264,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA order = order + 1 args["condition" .. i .. "value" .. j .. "glow_scale"] = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = blueIfNoValue2(data, conditions[i].changes[j], "value", "glow_scale", L["Scale"], L["Scale"]), desc = descIfNoValue2(data, conditions[i].changes[j], "value", "glow_scale", propertyType), diff --git a/WeakAurasOptions/DisplayOptions.lua b/WeakAurasOptions/DisplayOptions.lua index 74a5e1f..8f36c26 100644 --- a/WeakAurasOptions/DisplayOptions.lua +++ b/WeakAurasOptions/DisplayOptions.lua @@ -150,6 +150,12 @@ function OptionsPrivate.GetDisplayOptions(data) local options = flattenRegionOptions(regionOption, true) + for _, option in pairs(options) do + if option.type == "range" then + option.control = "WeakAurasSpinBox" + end + end + local region = { type = "group", name = L["Display"], diff --git a/WeakAurasOptions/GenericTrigger.lua b/WeakAurasOptions/GenericTrigger.lua index 1f306ee..54a17dd 100644 --- a/WeakAurasOptions/GenericTrigger.lua +++ b/WeakAurasOptions/GenericTrigger.lua @@ -412,9 +412,8 @@ local function GetGenericTriggerOptions(data, triggernum) name = "", order = 7.1, width = WeakAuras.normalWidth, - values = function() - return subtypes - end, + values = subtypes, + sorting = OptionsPrivate.Private.SortOrderForValues(subtypes), get = function(info) return trigger.event end, @@ -423,7 +422,6 @@ local function GetGenericTriggerOptions(data, triggernum) WeakAuras.Add(data) WeakAuras.ClearAndUpdateOptions(data.id) end, - control = "WeakAurasSortedDropdown", } end @@ -439,7 +437,7 @@ local function GetGenericTriggerOptions(data, triggernum) width = WeakAuras.normalWidth, order = 8, values = OptionsPrivate.Private.subevent_prefix_types, - control = "WeakAurasSortedDropdown", + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.subevent_prefix_types), hidden = function() return not (trigger.type == combatLogCategory and trigger.event == "Combat Log"); end, get = function(info) return trigger.subeventPrefix @@ -455,7 +453,7 @@ local function GetGenericTriggerOptions(data, triggernum) name = L["Message Suffix"], order = 9, values = OptionsPrivate.Private.subevent_suffix_types, - control = "WeakAurasSortedDropdown", + sorting = OptionsPrivate.Private.SortOrderForValues(OptionsPrivate.Private.subevent_suffix_types), hidden = function() return not (trigger.type == combatLogCategory and trigger.event == "Combat Log" and OptionsPrivate.Private.subevent_actual_prefix_types[trigger.subeventPrefix]); end, get = function(info) return trigger.subeventSuffix diff --git a/WeakAurasOptions/LoadOptions.lua b/WeakAurasOptions/LoadOptions.lua index 8c79819..8f1941a 100644 --- a/WeakAurasOptions/LoadOptions.lua +++ b/WeakAurasOptions/LoadOptions.lua @@ -16,17 +16,6 @@ local ValidateNumeric = WeakAuras.ValidateNumeric; local spellCache = WeakAuras.spellCache; -local function union(table1, table2) - local meta = {}; - for i,v in pairs(table1) do - meta[i] = v; - end - for i,v in pairs(table2) do - meta[i] = v; - end - return meta; -end - local function CorrectSpellName(input) local inputId = tonumber(input); if(inputId) then @@ -66,8 +55,57 @@ local function CorrectItemName(input) end -- Also used by the GenericTrigger + +local function getValue(trigger, preCheckField, field, multiEntry, entryNumber, tristate) + if preCheckField then + if tristate then + if trigger[preCheckField] ~= nil then + return nil + end + else + if not trigger[preCheckField] then + return nil + end + end + end + if multiEntry then + return type(trigger[field]) == "table" and trigger[field][entryNumber] or nil + else + return trigger[field] or nil + end +end + +local function shiftTable(tbl, pos) + local size = #tbl + for i = pos, size, 1 do + tbl[i] = tbl[i + 1] + end +end + +local function setValue(trigger, field, value, multiEntry, entryNumber) + if multiEntry then + if type(trigger[field]) ~= "table" then + if trigger[field] == nil then + trigger[field] = {} + else + trigger[field] = { trigger[field] } + end + end + if value == "" or value == nil then + shiftTable(trigger[field], entryNumber) + else + trigger[field][entryNumber] = value + end + else + trigger[field] = value + end +end + function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum, triggertype) local trigger + -- For load options only the hidden property counts, but for the generic trigger + -- we look at enabled. + local hiddenProperty = triggertype == "load" and "hidden" or "enable" if(data.controlledChildren) then trigger = {} elseif(triggertype == "load") then @@ -75,7 +113,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum elseif data.triggers[triggernum] then trigger = data.triggers[triggernum].trigger else - error("Improper argument to WeakAuras.ConstructOptions - trigger number not in range"); + error("Improper argument to OptionsPrivate.ConstructOptions - trigger number not in range"); end local options = {}; local order = startorder or 10; @@ -84,20 +122,34 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum local positionsForCollapseAnchor = {} for index, arg in pairs(prototype.args) do local hidden = nil; - if(arg.collapse and isCollapsedFunctions[arg.collapse] and type(arg.enable) == "function") then + if(type(arg.sortOrder) == "function") then + arg.sortOrder = arg.sortOrder() + end + if(arg.collapse and isCollapsedFunctions[arg.collapse] and type(arg[hiddenProperty]) == "function") then local isCollapsed = isCollapsedFunctions[arg.collapse] - hidden = function() - return isCollapsed() or not arg.enable(trigger) + if hiddenProperty == "hidden" then + hidden = function() return isCollapsed() or arg[hiddenProperty](trigger) end + else + hidden = function() return isCollapsed() or not arg[hiddenProperty](trigger) end + end + elseif type(arg[hiddenProperty]) == "function" then + if hiddenProperty == "hidden" then + hidden = function() return arg[hiddenProperty](trigger) end + else + hidden = function() return not arg[hiddenProperty](trigger) end + end + elseif type(arg[hiddenProperty]) == "boolean" then + if hiddenProperty == "hidden" then + hidden = arg[hiddenProperty] + else + hidden = not arg[hiddenProperty] end - elseif(type(arg.enable) == "function") then - hidden = function() return not arg.enable(trigger) end; elseif(arg.collapse and isCollapsedFunctions[arg.collapse]) then hidden = isCollapsedFunctions[arg.collapse] - positionsForCollapseAnchor[arg.collapse] = order end local name = arg.name; local validate = arg.validate; - local reloadOptions = arg.reloadOptions; + local reloadOptions = arg.reloadOptions or arg.multiEntry ~= nil if (name and arg.type == "collapse") then options["summary_" .. arg.name] = { type = "execute", @@ -127,7 +179,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum isCollapsedFunctions[name] = function() return OptionsPrivate.IsCollapsed("trigger", name, "", true); end - elseif(name and not arg.hidden) then + elseif name and (hiddenProperty == "hidden" or not arg.hidden) then local realname = name; if (arg.type == "multiselect") then -- Ensure new line for non-toggle options @@ -169,9 +221,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum end end WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end + WeakAuras.ClearAndUpdateOptions(data.id) OptionsPrivate.Private.ScanForLoads({[data.id] = true}); WeakAuras.UpdateThumbnail(data); OptionsPrivate.SortDisplayButtons(nil, true); @@ -185,6 +235,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum width = WeakAuras.normalWidth, name = arg.display, desc = function() + if arg.multiNoSingle or arg.desc then return arg.desc end local v = trigger["use_"..realname]; if(v == true) then return L["Multiselect single tooltip"]; @@ -196,30 +247,46 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum end, get = function() local value = trigger["use_"..realname]; - if(value == nil) then return false; - elseif(value == false) then return "false"; - else return "true"; end + if arg.multiNoSingle then + if value == nil then + return false; + else + return "false" + end + else + if(value == nil) then return false; + elseif(value == false) then return "false"; + else return "true"; end + end end, set = function(info, v) - if(v) then - trigger["use_"..realname] = true; - else - local value = trigger["use_"..realname]; - if(value == false) then - trigger["use_"..realname] = nil; + if arg.multiNoSingle then + trigger[realname] = trigger[realname] or {}; + trigger[realname].multi = trigger[realname].multi or {}; + if v == true then + trigger["use_"..realname] = false; else - trigger["use_"..realname] = false - trigger[realname] = trigger[realname] or {}; - if(trigger[realname].single) then - trigger[realname].multi = trigger[realname].multi or {}; - trigger[realname].multi[trigger[realname].single] = true; + trigger["use_"..realname] = nil; + end + else + if v then + trigger["use_"..realname] = true; + else + local value = trigger["use_"..realname]; + if(value == false) then + trigger["use_"..realname] = nil; + else + trigger["use_"..realname] = false + trigger[realname] = trigger[realname] or {}; + if(trigger[realname].single) then + trigger[realname].multi = trigger[realname].multi or {}; + trigger[realname].multi[trigger[realname].single] = true; + end end end end WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end + WeakAuras.ClearAndUpdateOptions(data.id) OptionsPrivate.Private.ScanForLoads({[data.id] = true}); WeakAuras.UpdateThumbnail(data); OptionsPrivate.SortDisplayButtons(nil, true); @@ -235,6 +302,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum order = order, hidden = hidden, } + order = order + 1; options["description_title_"..name] = { type = "description", width = WeakAuras.doubleWidth, @@ -252,6 +320,15 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum hidden = hidden, } order = order + 1; + elseif (arg.type == "header") then + options["header_"..name] = { + type = "header", + width = WeakAuras.doubleWidth, + name = arg.display, + order = order, + hidden = hidden, + } + order = order + 1 else options["use_"..name] = { type = "toggle", @@ -264,9 +341,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum set = function(info, v) trigger["use_"..realname] = v; WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end + WeakAuras.ClearAndUpdateOptions(data.id) OptionsPrivate.Private.ScanForLoads({[data.id] = true}); WeakAuras.UpdateThumbnail(data); OptionsPrivate.SortDisplayButtons(nil, true); @@ -278,7 +353,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum end if(arg.type == "spell" or arg.type == "aura" or arg.type == "item") then if not arg.showExactOption then - options["use_"..name].width = arg.width or WeakAuras.normalWidth - 0.1; + options["use_"..name].width = (arg.width or WeakAuras.normalWidth) - 0.2; end end @@ -295,523 +370,705 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum end end order = order + 1; - if(arg.type == "number") then - if (not arg.noOperator) then - options[name.."_operator"] = { - type = "select", - width = WeakAuras.halfWidth, - name = L["Operator"], + + local countEntries = 0 + local multiEntry = arg.multiEntry ~= nil + if multiEntry then + if type(trigger[realname]) == "table" then + countEntries = #trigger[realname] + elseif trigger[realname] ~= nil then + countEntries = 1 + end + end + + for entryNumber = 1, countEntries + 1 do + if arg.multiEntry then + if arg.multiEntry.limit and entryNumber > arg.multiEntry.limit then + break + end + if entryNumber > 1 then + if arg.type == "tristate" or arg.type == "tristatestring" then + if trigger["use_"..realname] == nil then + break + end + else + if not trigger["use_"..realname] then + break + end + end + end + end + + local suffix = multiEntry and entryNumber or "" + if entryNumber > 1 then + options["spacer_"..name..suffix] = { + type = "execute", + name = arg.multiEntry.operator == "and" and L["and"] or L["or"], + image = function() return "", 0, 0 end, order = order, hidden = hidden, - values = arg.operator_types == "without_equal" and OptionsPrivate.Private.operator_types_without_equal or OptionsPrivate.Private.operator_types, - disabled = function() return not trigger["use_"..realname]; end, - get = function() return trigger["use_"..realname] and trigger[realname.."_operator"] or nil; end, - set = function(info, v) - trigger[realname.."_operator"] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - if(arg.required and not triggertype) then - options[name.."_operator"].set = function(info, v) - trigger[realname.."_operator"] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - order = order + 1; - end - options[name] = { - type = "input", - width = arg.noOperator and WeakAuras.normalWidth or WeakAuras.halfWidth, - validate = ValidateNumeric, - name = arg.display, - order = order, - hidden = hidden, - desc = arg.desc, - disabled = function() return not trigger["use_"..realname]; end, - get = function() return trigger["use_"..realname] and trigger[realname] or nil; end, - set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - if(arg.required and not triggertype) then - options[name].set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - order = order + 1; - elseif(arg.type == "string" or arg.type == "tristatestring") then - options[name] = { - type = "input", - width = WeakAuras.normalWidth, - name = arg.display, - order = order, - hidden = hidden, - validate = validate, - desc = arg.desc, - set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - - if arg.type == "string" then - options[name].disabled = function() return not trigger["use_"..realname] end - options[name].get = function() return trigger["use_"..realname] and trigger[realname] or nil; end - else - options[name].disabled = function() return trigger["use_"..realname] == nil end - options[name].get = function() return trigger["use_"..realname] ~= nil and trigger[realname] or nil; end - end - - if(arg.required and not triggertype) then - options[name].set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - order = order + 1; - elseif(arg.type == "longstring") then - options[name.."_operator"] = { - type = "select", - width = WeakAuras.normalWidth, - name = L["Operator"], - order = order, - hidden = hidden, - values = OptionsPrivate.Private.string_operator_types, - disabled = function() return not trigger["use_"..realname]; end, - get = function() return trigger["use_"..realname] and trigger[realname.."_operator"] or nil; end, - set = function(info, v) - trigger[realname.."_operator"] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - if(arg.required and not triggertype) then - options[name.."_operator"].set = function(info, v) - trigger[realname.."_operator"] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - order = order + 1; - options[name] = { - type = "input", - width = WeakAuras.doubleWidth, - name = arg.display, - order = order, - hidden = hidden, - validate = validate, - disabled = function() return not trigger["use_"..realname]; end, - get = function() return trigger["use_"..realname] and trigger[realname] or nil; end, - set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - if(arg.required and not triggertype) then - options[name].set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - order = order + 1; - elseif(arg.type == "spell" or arg.type == "aura" or arg.type == "item") then - if (arg.showExactOption) then - options["exact"..name] = { - type = "toggle", - width = WeakAuras.normalWidth - 0.1, - name = L["Exact Spell Match"], - order = order, - hidden = hidden, - get = function() - return trigger["use_exact_"..realname]; - end, - set = function(info, v) - trigger["use_exact_"..realname] = v; - WeakAuras.Add(data); - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end, - }; - order = order + 1; - end - options["icon"..name] = { - type = "execute", - width = 0.1, - name = "", - order = order, - hidden = hidden, - image = function() - if(trigger["use_"..realname] and trigger[realname]) then - if(arg.type == "aura") then - local icon = spellCache.GetIcon(trigger[realname]); - return icon and tostring(icon) or "", 18, 18; - elseif(arg.type == "spell") then - local _, _, icon = GetSpellInfo(trigger[realname]); - return icon and tostring(icon) or "", 18, 18; - elseif(arg.type == "item") then - local _, _, _, _, _, _, _, _, _, icon = GetItemInfo(trigger[realname]); - return icon and tostring(icon) or "", 18, 18; - end - else - return "", 18, 18; - end - end, - disabled = function() return not ((arg.type == "aura" and trigger[realname] and spellCache.GetIcon(trigger[realname])) or (arg.type == "spell" and trigger[realname] and GetSpellInfo(trigger[realname])) or (arg.type == "item" and trigger[realname] and GetItemIcon(trigger[realname]))) end - }; - order = order + 1; - options[name] = { - type = "input", - width = arg.showExactOption and WeakAuras.doubleWidth or WeakAuras.normalWidth, - name = arg.display, - order = order, - hidden = hidden, - validate = validate, - disabled = function() return not trigger["use_"..realname]; end, - get = function() - if(arg.type == "item") then - if(trigger["use_"..realname] and trigger[realname] and trigger[realname] ~= "") then - local name = GetItemInfo(trigger[realname]); - if(name) then - return name; - else - local itemId = tonumber(trigger[realname]) - if itemId and itemId ~= 0 then - return tostring(trigger[realname]) - end - return L["Invalid Item Name/ID/Link"]; - end - else - return nil; - end - elseif(arg.type == "spell") then - local useExactSpellId = (arg.showExactOption and trigger["use_exact_"..realname]) - if(trigger["use_"..realname]) then - if (trigger[realname] and trigger[realname] ~= "") then - if useExactSpellId then - local spellId = tonumber(trigger[realname]) - if (spellId and spellId ~= 0) then - return tostring(spellId); - end - else - local name = GetSpellInfo(trigger[realname]); - if(name) then - return name; - end - end - end - return useExactSpellId and L["Invalid Spell ID"] or L["Invalid Spell Name/ID/Link"]; - else - return nil; - end - else - return trigger["use_"..realname] and trigger[realname] or nil; - end - end, - set = function(info, v) - local fixedInput = v; - if(arg.type == "aura") then - fixedInput = WeakAuras.spellCache.CorrectAuraName(v); - elseif(arg.type == "spell") then - fixedInput = CorrectSpellName(v); - elseif(arg.type == "item") then - fixedInput = CorrectItemName(v); - end - trigger[realname] = fixedInput; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - order = order + 1; - elseif(arg.type == "select" or arg.type == "unit") then - local values; - if(type(arg.values) == "function") then - values = arg.values(trigger); - else - if OptionsPrivate.Private[arg.values] then - values = OptionsPrivate.Private[arg.values] - else - values = WeakAuras[arg.values]; - end - end - options[name] = { - type = "select", - width = WeakAuras.normalWidth, - name = arg.display, - order = order, - hidden = hidden, - values = values, - desc = arg.desc, - disabled = function() return not trigger["use_"..realname]; end, - get = function() - if(arg.type == "unit" and trigger["use_specific_"..realname]) then - return "member"; - end - - if (not trigger["use_"..realname]) then - return nil; - end - - if (arg.default and (not trigger[realname] or not values[trigger[realname]])) then - trigger[realname] = arg.default; - return arg.default; - end - - return trigger[realname] or nil; - end, - set = function(info, v) - trigger[realname] = v; - if(arg.type == "unit" and v == "member") then - trigger["use_specific_"..realname] = true; - trigger[realname] = UnitName("player"); - else - trigger["use_specific_"..realname] = nil; - end - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - if(arg.required and not triggertype) then - options[name].set = function(info, v) - trigger[realname] = v; - if(arg.type == "unit" and v == "member") then - trigger["use_specific_"..realname] = true; - else - trigger["use_specific_"..realname] = nil; - end - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - if (arg.control) then - options[name].control = arg.control; - end - order = order + 1; - if(arg.type == "unit") then - options["use_specific_"..name] = { - type = "toggle", - width = WeakAuras.normalWidth, - name = L["Specific Unit"], - order = order, - hidden = function() return (not trigger["use_specific_"..realname] and trigger[realname] ~= "member") or (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) end, - get = function() return true end, - set = function(info, v) - trigger["use_specific_"..realname] = nil; - options[name].set(info, "player"); - WeakAuras.Add(data) - end - } - order = order + 1; - options["specific_"..name] = { - type = "input", - width = WeakAuras.normalWidth, - name = L["Specific Unit"], - desc = L["Can be a UID (e.g., party1)."], - order = order, - hidden = function() return (not trigger["use_specific_"..realname] and trigger[realname] ~= "member") or (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) end, - get = function() return trigger[realname] end, - set = function(info, v) - trigger[realname] = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - end - }; - order = order + 1; - end - elseif(arg.type == "multiselect") then - local values; - if(type(arg.values) == "function") then - values = arg.values(trigger); - else - if OptionsPrivate.Private[arg.values] then - values = OptionsPrivate.Private[arg.values] - else - values = WeakAuras[arg.values]; - end - end - options[name] = { - type = "select", - width = WeakAuras.normalWidth, - name = arg.display, - order = order, - values = values, - control = arg.control, - hidden = function() - return (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) or trigger["use_"..realname] == false; - end, - disabled = function() return not trigger["use_"..realname]; end, - get = function() return trigger["use_"..realname] and trigger[realname] and trigger[realname].single or nil; end, - set = function(info, v) - trigger[realname] = trigger[realname] or {}; - trigger[realname].single = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - }; - if(arg.required and not triggertype) then - options[name].set = function(info, v) - trigger[realname].single = v; - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); - end - end - - if arg.extraOption then - options["multiselect_extraOption_" .. name] = - { - name = arg.extraOption.display, - type = "select", - values = arg.extraOption.values, - order = order, - width = WeakAuras.normalWidth, - hidden = function() return (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) or trigger["use_"..realname] ~= false; end, - get = function(info, v) - return trigger[realname .. "_extraOption"] or 0 - end, - set = function(info, v) - trigger[realname .. "_extraOption"] = v - WeakAuras.Add(data) - OptionsPrivate.Private.ScanForLoads({[data.id] = true}) - OptionsPrivate.SortDisplayButtons(nil, true) - end } order = order + 1 end - options["multiselect_"..name] = { - type = "multiselect", - name = arg.display, - width = WeakAuras.doubleWidth, - order = order, - hidden = function() return (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) or trigger["use_"..realname] ~= false; end, - values = values, - get = function(info, v) - if(trigger["use_"..realname] == false and trigger[realname] and trigger[realname].multi) then - return trigger[realname].multi[v]; - end - end, - set = function(info, v, calledFromSetAll) - trigger[realname].multi = trigger[realname].multi or {}; - if (calledFromSetAll) then - trigger[realname].multi[v] = calledFromSetAll; - elseif(trigger[realname].multi[v]) then - trigger[realname].multi[v] = nil; - else - trigger[realname].multi[v] = true; - end - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); + if(arg.type == "number") then + if entryNumber > 1 then + options["spacer_"..name..suffix].width = WeakAuras.normalWidth end - }; - if(arg.required and not triggertype) then - options[name].set = function(info, v) - if(trigger[realname].multi[v]) then - trigger[realname].multi[v] = nil; - else - trigger[realname].multi[v] = true; - end - WeakAuras.Add(data); - if (reloadOptions) then - WeakAuras.ClearAndUpdateOptions(data.id) - end - OptionsPrivate.Private.ScanForLoads({[data.id] = true}); - WeakAuras.UpdateThumbnail(data); - OptionsPrivate.SortDisplayButtons(nil, true); + local disabled = not trigger["use_"..realname] + options[name..suffix .. "dummy"] = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled or hidden, + hiddenAllIfAnyHidden = true + } + order = order + 1 + if (not arg.noOperator) then + options[name.."_operator"..suffix] = { + type = "select", + width = WeakAuras.halfWidth, + name = L["Operator"], + order = order, + hidden = disabled or hidden, + values = arg.operator_types == "without_equal" and OptionsPrivate.Private.operator_types_without_equal or OptionsPrivate.Private.operator_types, + get = function() + return getValue(trigger, "use_"..realname, realname.."_operator", multiEntry, entryNumber) + end, + set = function(info, v) + setValue(trigger, realname.."_operator", v, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + order = order + 1; + end + options[name..suffix] = { + type = "input", + width = arg.noOperator and WeakAuras.normalWidth or WeakAuras.halfWidth, + validate = ValidateNumeric, + name = arg.display, + order = order, + hidden = disabled or hidden, + desc = arg.desc, + get = function() return getValue(trigger, "use_"..realname, realname, multiEntry, entryNumber) end, + set = function(info, v) + setValue(trigger, realname, v, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + order = order + 1; + elseif(arg.type == "string" or arg.type == "tristatestring") then + if not arg.multiline and entryNumber > 1 then + options["spacer_"..name..suffix].width = WeakAuras.normalWidth end - end - order = order + 1; + local disabled + if arg.type == "string" then + disabled = not trigger["use_"..realname] + else + disabled = trigger["use_"..realname] == nil + end + + options[name..suffix.."dummy"] = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled or hidden, + hiddenAllIfAnyHidden = true + } + order = order + 1 + options[name..suffix] = { + type = "input", + width = arg.multiline and WeakAuras.doubleWidth or WeakAuras.normalWidth, + name = arg.display, + order = order, + hidden = disabled or hidden, + validate = validate, + desc = arg.desc, + multiline = arg.multiline, + control = arg.multiline and "WeakAuras-MultiLineEditBoxWithEnter" or nil, + get = function() + return getValue(trigger, "use_"..realname, realname, multiEntry, entryNumber, arg.type == "tristatestring") + end, + set = function(info, v) + setValue(trigger, realname, v, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + order = order + 1 + elseif(arg.type == "longstring") then + if entryNumber > 1 then + options["spacer_"..name..suffix].width = WeakAuras.normalWidth + end + local disabled = not trigger["use_"..realname] + options[name..suffix.."dummy"] = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled or hidden, + hiddenAllIfAnyHidden = true + } + order = order + 1; + options[name.."_operator"..suffix] = { + type = "select", + width = WeakAuras.normalWidth, + name = L["Operator"], + order = order, + hidden = disabled or hidden, + values = OptionsPrivate.Private.string_operator_types, + get = function() return getValue(trigger, "use_"..realname, realname.."_operator", multiEntry, entryNumber) end, + set = function(info, v) + setValue(trigger, realname.."_operator", v, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + order = order + 1; + options[name..suffix] = { + type = "input", + width = arg.canBeCaseInsensitive and WeakAuras.normalWidth or WeakAuras.doubleWidth, + name = arg.display, + order = order, + hidden = disabled or hidden, + validate = validate, + get = function() return getValue(trigger, "use_"..realname, realname, multiEntry, entryNumber) end, + set = function(info, v) + setValue(trigger, realname, v, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + order = order + 1; + if arg.canBeCaseInsensitive then + options[name.."_caseInsensitive"..suffix] = { + type = "toggle", + width = WeakAuras.normalWidth, + name = L["Case Insensitive"], + order = order, + hidden = disabled or hidden, + get = function() return getValue(trigger, "use_"..realname, realname.."_caseInsensitive", multiEntry, entryNumber) end, + set = function(info, v) + setValue(trigger, realname.."_caseInsensitive", v, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + order = order + 1; + end + elseif(arg.type == "spell" or arg.type == "aura" or arg.type == "item") then + if entryNumber > 1 then + options["spacer_"..name..suffix].width = WeakAuras.normalWidth - (arg.showExactOption and 0 or 0.2) + end + local disabled = not trigger["use_"..realname] + options[name..suffix.."dummy"] = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled or hidden, + hiddenAllIfAnyHidden = true + } + order = order + 1 + if (arg.showExactOption) then + options["exact"..name..suffix] = { + type = "toggle", + width = WeakAuras.normalWidth, + name = arg.type == "item" and L["Exact Item Match"] or L["Exact Spell Match"], + order = order, + hidden = disabled or hidden, + get = function() + return getValue(trigger, nil, "use_exact_"..realname, multiEntry, entryNumber) + end, + set = function(info, v) + setValue(trigger, "use_exact_"..realname, v, multiEntry, entryNumber) + WeakAuras.Add(data); + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end, + }; + order = order + 1; + end + options["icon"..name..suffix] = { + type = "execute", + width = 0.2, + name = "", + order = order, + hidden = disabled or hidden, + image = function() + local value = getValue(trigger, "use_"..realname, realname, multiEntry, entryNumber) + if value then + if(arg.type == "aura") then + local icon = spellCache.GetIcon(value); + return icon and tostring(icon) or "", 18, 18; + elseif(arg.type == "spell") then + local _, _, icon = GetSpellInfo(value); + return icon and tostring(icon) or "", 18, 18; + elseif(arg.type == "item") then + local _, _, _, _, _, _, _, _, _, icon = GetItemInfo(value); + return icon and tostring(icon) or "", 18, 18; + end + else + return "", 18, 18; + end + end, + disabled = function() + local value = getValue(trigger, nil, realname, multiEntry, entryNumber) + return not ((arg.type == "aura" and value and spellCache.GetIcon(value)) or (arg.type == "spell" and value and GetSpellInfo(value)) or (arg.type == "item" and value and GetItemIcon(value))) + end + }; + order = order + 1; + options[name..suffix] = { + type = "input", + width = (arg.showExactOption and WeakAuras.doubleWidth or WeakAuras.normalWidth) - (arg.showExactOption and 0.2 or 0), + name = arg.display, + order = order, + hidden = disabled or hidden, + validate = validate, + get = function() + local value = getValue(trigger, "use_"..realname, realname, multiEntry, entryNumber) + if(arg.type == "item") then + local useExactSpellId = (arg.showExactOption and getValue(trigger, nil, "use_exact_"..realname, multiEntry, entryNumber)) + if value and value ~= "" then + if useExactSpellId then + local itemId = tonumber(value) + if itemId and itemId ~= 0 then + local itemName = GetItemInfo(value) + if itemName then + return ("%s (%s)"):format(itemId, itemName) .. "\0" .. value + end + return tostring(value) + end + else + local name = GetItemInfo(value); + if name then + return name; + end + end + return (useExactSpellId and L["Invalid Item ID"] or L["Invalid Item Name/ID/Link"]) .. "\0" + else + return nil; + end + elseif(arg.type == "spell") then + local useExactSpellId = (arg.showExactOption and getValue(trigger, nil, "use_exact_"..realname, multiEntry, entryNumber)) + if value and value ~= "" then + local spellID = WeakAuras.SafeToNumber(value) + if spellID then + local spellName = GetSpellInfo(WeakAuras.SafeToNumber(value)) + if spellName then + return ("%s (%s)"):format(spellID, spellName) .. "\0" .. value + end + elseif not useExactSpellId and not arg.noValidation then + local spellName = GetSpellInfo(value) + if spellName then + return spellName + end + end + end + if arg.noValidation then + return value and tostring(value) + end + if value == nil then + return nil + end + return (useExactSpellId and L["Invalid Spell ID"] or L["Invalid Spell Name/ID/Link"]) .. "\0" + else + return value or nil + end + end, + set = function(info, v) + local fixedInput = v; + if not arg.noValidation then + if(arg.type == "aura") then + fixedInput = WeakAuras.spellCache.CorrectAuraName(v); + elseif(arg.type == "spell") then + fixedInput = CorrectSpellName(v); + elseif(arg.type == "item") then + fixedInput = CorrectItemName(v); + end + end + setValue(trigger, realname, fixedInput, multiEntry, entryNumber) + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end, + control = "WeakAurasInputFocus", + }; + order = order + 1; + elseif(arg.type == "select" or arg.type == "unit" or arg.type == "currency") then + if entryNumber > 1 then + options["spacer_"..name..suffix].width = WeakAuras.normalWidth + end + + local disabled = not trigger["use_"..realname] + options[name..suffix.."dummy"] = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled or hidden, + hiddenAllIfAnyHidden = true + } + order = order + 1 + local values; + if(type(arg.values) == "function") then + values = arg.values(trigger); + else + if OptionsPrivate.Private[arg.values] then + values = OptionsPrivate.Private[arg.values] + else + values = WeakAuras[arg.values]; + end + end + local sortOrder = arg.sorted and (arg.sortOrder or OptionsPrivate.Private.SortOrderForValues(values)) or nil + options[name..suffix] = { + type = "select", + width = WeakAuras.normalWidth, + name = arg.display, + order = order, + hidden = disabled or hidden, + values = values, + sorting = sortOrder, + desc = arg.desc, + itemControl = arg.itemControl, + headers = arg.headers, + + get = function() + if((arg.type == "unit" or arg.type == "currency") and trigger["use_specific_"..realname]) then + return "member"; + end + + if (not trigger["use_"..realname]) then + return nil; + end + + if (arg.default and (not trigger[realname] or not values[trigger[realname]])) then + trigger[realname] = arg.default; + return arg.default; + end + + return trigger[realname] or nil; + end, + set = function(info, v) + setValue(trigger, realname, v, multiEntry, entryNumber) + if((arg.type == "unit" or arg.type == "currency") and v == "member") then + trigger["use_specific_"..realname] = true; + trigger[realname] = arg.type == "unit" and UnitName("player") or nil; + else + trigger["use_specific_"..realname] = nil; + end + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + if (arg.control) then + options[name .. suffix].control = arg.control; + end + order = order + 1; + if(arg.type == "unit" or arg.type == "currency") then + local specificName = arg.type == "unit" and L["Specific Unit"] or L["Specific Currency ID"]; + local specificDesc = arg.type == "unit" and L["Can be a UID (e.g., party1)."] or nil; + options["use_specific_"..name..suffix] = { + type = "toggle", + width = WeakAuras.normalWidth, + name = specificName, + order = order, + hidden = disabled or function() + return (not trigger["use_specific_"..realname] and trigger[realname] ~= "member") + or (type(hidden) == "function" and hidden(trigger)) + or (type(hidden) ~= "function" and hidden) + end, + get = function() return true end, + set = function(info, v) + trigger["use_specific_"..realname] = nil; + options[name .. suffix].set(info, "player"); + WeakAuras.Add(data) + end + } + order = order + 1; + options["specific_"..name..suffix] = { + type = "input", + width = WeakAuras.normalWidth, + name = specificName, + desc = specificDesc, + order = order, + validate = arg.type == "currency" and WeakAuras.ValidateNumeric or false, + hidden = disabled or function() return (not trigger["use_specific_"..realname] and trigger[realname] ~= "member") or (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) end, + get = function() return trigger[realname] end, + set = function(info, v) + trigger[realname] = v; + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + end + }; + order = order + 1; + end + elseif(arg.type == "multiselect") then + if entryNumber > 1 then + options["spacer_"..name..suffix].width = WeakAuras.normalWidth + end + local disabled = trigger["use_"..realname] == nil + options[name..suffix.."dummy"] = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled or hidden, + hiddenAllIfAnyHidden = true + } + order = order + 1 + local values; + if(type(arg.values) == "function") then + values = arg.values(trigger); + else + if OptionsPrivate.Private[arg.values] then + values = OptionsPrivate.Private[arg.values] + else + values = WeakAuras[arg.values]; + end + end + local sortOrder = arg.sorted and OptionsPrivate.Private.SortOrderForValues(values) or nil + options[name..suffix] = { + type = "select", + width = WeakAuras.normalWidth, + name = arg.display, + order = order, + values = values, + sorting = sortOrder, + control = arg.control, + hidden = disabled or function() + return (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) or trigger["use_"..realname] == false; + end, + get = function() return trigger["use_"..realname] and trigger[realname] and trigger[realname].single or nil; end, + set = function(info, v) + trigger[realname] = trigger[realname] or {}; + trigger[realname].single = v; + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + }; + + if arg.extraOption then + options["multiselect_extraOption_" .. name..suffix] = + { + name = arg.extraOption.display, + type = "select", + values = arg.extraOption.values, + order = order, + width = WeakAuras.normalWidth, + hidden = disabled or function() return (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) or trigger["use_"..realname] ~= false; end, + get = function(info, v) + return trigger[realname .. "_extraOption"] or 0 + end, + set = function(info, v) + trigger[realname .. "_extraOption"] = v + WeakAuras.Add(data) + OptionsPrivate.Private.ScanForLoads({[data.id] = true}) + OptionsPrivate.SortDisplayButtons(nil, true) + end + } + order = order + 1 + end + + options["multiselect_"..name..suffix] = { + type = "multiselect", + name = arg.display, + width = WeakAuras.doubleWidth, + order = order, + hidden = disabled or function() return (type(hidden) == "function" and hidden(trigger)) or (type(hidden) ~= "function" and hidden) or trigger["use_"..realname] ~= false; end, + values = values, + control = arg.multiUseControlWhenFalse and arg.control, + multiTristate = arg.multiTristate, + get = function(info, v) + if(trigger["use_"..realname] == false and trigger[realname] and trigger[realname].multi) then + if arg.multiConvertKey then + v = arg.multiConvertKey(trigger, v) + end + if v then + return trigger[realname].multi[v]; + end + end + end, + set = function(info, v, calledFromSetAll) + if arg.multiConvertKey then + v = arg.multiConvertKey(trigger, v) + end + if v then + trigger[realname].multi = trigger[realname].multi or {}; + if (calledFromSetAll or arg.multiTristate) then + trigger[realname].multi[v] = calledFromSetAll; + elseif(trigger[realname].multi[v]) then + trigger[realname].multi[v] = nil; + else + trigger[realname].multi[v] = true; + end + WeakAuras.Add(data); + if (reloadOptions) then + WeakAuras.ClearAndUpdateOptions(data.id) + WeakAuras.FillOptions() + end + OptionsPrivate.Private.ScanForLoads({[data.id] = true}); + WeakAuras.UpdateThumbnail(data); + OptionsPrivate.SortDisplayButtons(nil, true); + end + end + }; + order = order + 1; + end end end + + if(arg.collapse and isCollapsedFunctions[arg.collapse]) then + positionsForCollapseAnchor[arg.collapse] = order + order = order +1 + end end + if prototype.countEvents then + options.use_count = { + type = "toggle", + width = WeakAuras.normalWidth, + name = WeakAuras.newFeatureString .. L["Count"], + order = order, + get = function() + return trigger.use_count + end, + set = function(info, v) + trigger.use_count = v + WeakAuras.Add(data) + WeakAuras.ClearAndUpdateOptions(data.id) + end + }; + order = order + 1; + + local disabled = not trigger.use_count + if disabled then + options.countDummy = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hidden = not disabled, + hiddenAllIfAnyHidden = true + } + order = order + 1 + else + options.count = { + type = "input", + width = WeakAuras.normalWidth, + name = L["Count"], + desc = L["Occurrence of the event, reset when aura is unloaded\nCan be a range of values\nCan have multiple values separated by a comma or a space\n\nExamples:\n2nd 5th and 6th events: 2, 5, 6\n2nd to 6th: 2-6\nevery 2 events: /2\nevery 3 events starting from 2nd: 2/3\nevery 3 events starting from 2nd and ending at 11th: 2-11/3"], + order = order, + get = function() + return trigger.count + end, + set = function(info, v) + trigger.count = v + WeakAuras.Add(data) + end, + hidden = disabled + }; + order = order + 1; + end + end + if prototype.delayEvents then + options.use_delay = { + type = "toggle", + width = WeakAuras.normalWidth, + name = WeakAuras.newFeatureString .. L["Delay"], + order = order, + get = function() + return trigger.use_delay + end, + set = function(info, v) + trigger.use_delay = v + WeakAuras.Add(data) + WeakAuras.ClearAndUpdateOptions(data.id) + end + }; + order = order + 1; + + local disabled = not trigger.use_delay + if disabled then + options.delayDummy = { + type = "description", + name = "", + width = WeakAuras.normalWidth, + order = order, + hiddenAllIfAnyHidden = true + } + order = order + 1 + else + options.delay = { + type = "input", + width = WeakAuras.normalWidth, + name = L["Delay"], + order = order, + + validate = WeakAuras.ValidateTime, + get = function() + return OptionsPrivate.Private.tinySecondFormat(trigger.delay) + end, + set = function(info, v) + trigger.delay = WeakAuras.TimeToSeconds(v) + WeakAuras.Add(data) + end + }; + order = order + 1; + end + end if prototype.timedrequired then options.unevent = { type = "select", @@ -832,14 +1089,15 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum type = "input", width = WeakAuras.normalWidth, name = L["Duration (s)"], + validate = WeakAuras.ValidateTime, order = order, get = function() - return trigger.duration + return OptionsPrivate.Private.tinySecondFormat(trigger.duration) end, set = function(info, v) - trigger.duration = v + trigger.duration = tostring(WeakAuras.TimeToSeconds(v)) WeakAuras.Add(data) - end, + end } order = order + 1; end @@ -849,7 +1107,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum type = "description", name = "", control = "WeakAurasExpandAnchor", - order = order + 0.5, + order = order, arg = { expanderName = triggernum .. "#" .. tostring(prototype) .. "#" .. name }, diff --git a/WeakAurasOptions/Locales/deDE.lua b/WeakAurasOptions/Locales/deDE.lua index 6e073dd..1d67876 100644 --- a/WeakAurasOptions/Locales/deDE.lua +++ b/WeakAurasOptions/Locales/deDE.lua @@ -428,6 +428,8 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event(s)"] = "Ereignis(se)" L["Everything"] = "Alles" --[[Translation missing --]] + L["Exact Item Match"] = "Exact Item Match" + --[[Translation missing --]] L["Exact Spell ID(s)"] = "Exact Spell ID(s)" --[[Translation missing --]] L["Exact Spell Match"] = "Exact Spell Match" @@ -1059,6 +1061,8 @@ Nur ein Wert kann ausgewählt werden.]=] L["UnitName Filter"] = "UnitName Filter" --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" + --[[Translation missing --]] + L["Unknown Spell"] = "Unknown Spell" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Anders als die Start- und Endanimation wird die Hauptanimation immer wieder wiederholt, bis die Anzeige in den Endstatus versetzt wird." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/esES.lua b/WeakAurasOptions/Locales/esES.lua index 6a78fa4..3009603 100644 --- a/WeakAurasOptions/Locales/esES.lua +++ b/WeakAurasOptions/Locales/esES.lua @@ -448,6 +448,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event(s)"] = "Event(s)" --[[Translation missing --]] L["Everything"] = "Everything" + L["Exact Item Match"] = "Coincidencia exacta de objeto" --[[Translation missing --]] L["Exact Spell ID(s)"] = "Exact Spell ID(s)" --[[Translation missing --]] @@ -1202,6 +1203,7 @@ Sólo un valor coincidente puede ser escogido.]=] L["UnitName Filter"] = "UnitName Filter" --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" + L["Unknown Spell"] = "Hechizo desconocido" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Ignorar animaciones de inicio y final: la animación principal se repetirá hasta que el aura se oculte." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/esMX.lua b/WeakAurasOptions/Locales/esMX.lua index 6cbcae2..a5feadb 100644 --- a/WeakAurasOptions/Locales/esMX.lua +++ b/WeakAurasOptions/Locales/esMX.lua @@ -424,6 +424,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event(s)"] = "Evento(s)" --[[Translation missing --]] L["Everything"] = "Everything" + L["Exact Item Match"] = "Coincidencia exacta de objeto" --[[Translation missing --]] L["Exact Spell ID(s)"] = "Exact Spell ID(s)" --[[Translation missing --]] @@ -1111,6 +1112,7 @@ Sólo un valor coincidente puede ser escogido.]=] L["UnitName Filter"] = "UnitName Filter" --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" + L["Unknown Spell"] = "Hechizo desconocido" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Ignorar animaciones de inicio y final: la animación principal se repetirá hasta que el aura se oculte." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/frFR.lua b/WeakAurasOptions/Locales/frFR.lua index 4257e46..74e499c 100644 --- a/WeakAurasOptions/Locales/frFR.lua +++ b/WeakAurasOptions/Locales/frFR.lua @@ -365,6 +365,8 @@ Ne sautez pas cette version]=] L["Event Type"] = "Type d'évènement" L["Event(s)"] = "Évènement(s)" L["Everything"] = "Tous" + --[[Translation missing --]] + L["Exact Item Match"] = "Exact Item Match" L["Exact Spell ID(s)"] = "ID(s) de sort exact(s)" L["Exact Spell Match"] = "Correspondance Exacte du Sort" L["Expand"] = "Agrandir" @@ -920,6 +922,8 @@ Seule une unique valeur peut être choisie]=] L["UnitName Filter"] = "UnitName Filter" --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" + --[[Translation missing --]] + L["Unknown Spell"] = "Unknown Spell" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Contrairement aux animations de début et de fin, l'animation principale bouclera tant que l'affichage est visible." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/itIT.lua b/WeakAurasOptions/Locales/itIT.lua index fefefeb..8d4d25b 100644 --- a/WeakAurasOptions/Locales/itIT.lua +++ b/WeakAurasOptions/Locales/itIT.lua @@ -460,6 +460,8 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S --[[Translation missing --]] L["Everything"] = "Everything" --[[Translation missing --]] + L["Exact Item Match"] = "Exact Item Match" + --[[Translation missing --]] L["Exact Spell ID(s)"] = "Exact Spell ID(s)" --[[Translation missing --]] L["Exact Spell Match"] = "Exact Spell Match" @@ -1310,6 +1312,8 @@ Supports multiple entries, separated by commas --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" --[[Translation missing --]] + L["Unknown Spell"] = "Unknown Spell" + --[[Translation missing --]] L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Unlike the start or finish animations, the main animation will loop over and over until the display is hidden." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/koKR.lua b/WeakAurasOptions/Locales/koKR.lua index 945eaf2..1af8660 100644 --- a/WeakAurasOptions/Locales/koKR.lua +++ b/WeakAurasOptions/Locales/koKR.lua @@ -358,6 +358,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event Type"] = "이벤트 유형" L["Event(s)"] = "이벤트" L["Everything"] = "모두" + L["Exact Item Match"] = "정확한 아이템 일치" L["Exact Spell ID(s)"] = "정확한 주문 ID" L["Exact Spell Match"] = "정확한 주문 일치" L["Expand"] = "확장" @@ -864,6 +865,7 @@ Supports multiple entries, separated by commas L["UnitName Filter"] = "유닛명 필터" --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" + L["Unknown Spell"] = "알 수 없는 주문" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "시작 또는 종료 애니메이션과 달리 메인 애니메이션은 디스플레이가 숨겨질 때까지 계속 반복됩니다." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/ptBR.lua b/WeakAurasOptions/Locales/ptBR.lua index a791433..dc28b7d 100644 --- a/WeakAurasOptions/Locales/ptBR.lua +++ b/WeakAurasOptions/Locales/ptBR.lua @@ -403,6 +403,8 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S --[[Translation missing --]] L["Everything"] = "Everything" --[[Translation missing --]] + L["Exact Item Match"] = "Exact Item Match" + --[[Translation missing --]] L["Exact Spell ID(s)"] = "Exact Spell ID(s)" --[[Translation missing --]] L["Exact Spell Match"] = "Exact Spell Match" @@ -1176,6 +1178,8 @@ Supports multiple entries, separated by commas --[[Translation missing --]] L["Unknown property '%s' found in '%s'"] = "Unknown property '%s' found in '%s'" --[[Translation missing --]] + L["Unknown Spell"] = "Unknown Spell" + --[[Translation missing --]] L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "Unlike the start or finish animations, the main animation will loop over and over until the display is hidden." --[[Translation missing --]] L["Update %s by %s"] = "Update %s by %s" diff --git a/WeakAurasOptions/Locales/ruRU.lua b/WeakAurasOptions/Locales/ruRU.lua index fa68dc1..2a11e18 100644 --- a/WeakAurasOptions/Locales/ruRU.lua +++ b/WeakAurasOptions/Locales/ruRU.lua @@ -428,6 +428,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event Type"] = "Тип триггера" L["Event(s)"] = "События" L["Everything"] = "Всех вкладок" + L["Exact Item Match"] = "Точное совпадение" L["Exact Spell ID(s)"] = "ID заклинания" L["Exact Spell Match"] = "Точное совпадение" L["Expand"] = "Развернуть" @@ -876,6 +877,7 @@ Supports multiple entries, separated by commas L["Unit Name Filter"] = "Фильтр по имени единицы" L["UnitName Filter"] = "Фильтр по имени единицы" L["Unknown property '%s' found in '%s'"] = "Неизвестное свойство %s в переменной %s." + L["Unknown Spell"] = "Неизвестное заклинание" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "В отличие от начальной или конечной анимации, основная зациклена и будет повторяться пока индикация не пропадет." L["Update %s by %s"] = "Обновить %s (автор %s)" L["Update Auras"] = "Обновить индикации" diff --git a/WeakAurasOptions/Locales/zhCN.lua b/WeakAurasOptions/Locales/zhCN.lua index 4c44c83..dc6ddcf 100644 --- a/WeakAurasOptions/Locales/zhCN.lua +++ b/WeakAurasOptions/Locales/zhCN.lua @@ -309,6 +309,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event Type"] = "事件类型" L["Event(s)"] = "事件(复数)" L["Everything"] = "全部" + L["Exact Item Match"] = "严格物品匹配" L["Exact Spell ID(s)"] = "精确法术 ID" L["Exact Spell Match"] = "严格法术匹配" L["Expand"] = "展开" @@ -746,6 +747,7 @@ Supports multiple entries, separated by commas L["Unit Name Filter"] = "单位名称过滤方式" L["UnitName Filter"] = "单位名称过滤" L["Unknown property '%s' found in '%s'"] = "发现'%2$s'的未知属性'%1$s'" + L["Unknown Spell"] = "未知法术" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "不同于开始或结束动画,主动画将不停循环,直到图示被隐藏。" L["Update %s by %s"] = "更新%s,来自%s" L["Update Auras"] = "更新光环" diff --git a/WeakAurasOptions/Locales/zhTW.lua b/WeakAurasOptions/Locales/zhTW.lua index 6d0bf9d..3ad44fe 100644 --- a/WeakAurasOptions/Locales/zhTW.lua +++ b/WeakAurasOptions/Locales/zhTW.lua @@ -310,6 +310,7 @@ UNIT_POWER_UPDATE:player, UNIT_AURA:nameplate:group PLAYER_TARGET_CHANGED CLEU:S L["Event Type"] = "事件類型" L["Event(s)"] = "事件" L["Everything"] = "全部" + L["Exact Item Match"] = "完全符合物品" L["Exact Spell ID(s)"] = "正確的法術 ID" L["Exact Spell Match"] = "完全符合法術" L["Expand"] = "展開" @@ -748,6 +749,7 @@ Supports multiple entries, separated by commas L["Unit Name Filter"] = "單位名字過濾方式" L["UnitName Filter"] = "單位名字過濾方式" L["Unknown property '%s' found in '%s'"] = "發現未知屬性 '%s',在 '%s'" + L["Unknown Spell"] = "未知的法術" L["Unlike the start or finish animations, the main animation will loop over and over until the display is hidden."] = "不同於開始或結束時的動畫,主要動畫將重複循環直到提醒效果被隱藏。" L["Update %s by %s"] = "更新 %s 透過 %s" L["Update Auras"] = "更新提醒效果" diff --git a/WeakAurasOptions/RegionOptions/AuraBar.lua b/WeakAurasOptions/RegionOptions/AuraBar.lua index e17aa6e..99be9f3 100644 --- a/WeakAurasOptions/RegionOptions/AuraBar.lua +++ b/WeakAurasOptions/RegionOptions/AuraBar.lua @@ -102,6 +102,7 @@ local function createOptions(id, data) }, alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Bar Alpha"], order = 39.3, @@ -206,6 +207,7 @@ local function createOptions(id, data) }, zoom = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Zoom"], order = 40.91, @@ -292,6 +294,7 @@ local function createOptions(id, data) }, sparkWidth = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Width"], order = 44.6, @@ -303,6 +306,7 @@ local function createOptions(id, data) }, sparkHeight = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Height"], order = 44.7, @@ -314,6 +318,7 @@ local function createOptions(id, data) }, sparkOffsetX = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Offset"], order = 44.8, @@ -325,6 +330,7 @@ local function createOptions(id, data) }, sparkOffsetY = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], order = 44.9, @@ -345,6 +351,7 @@ local function createOptions(id, data) }, sparkRotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Rotation"], min = 0, diff --git a/WeakAurasOptions/RegionOptions/DynamicGroup.lua b/WeakAurasOptions/RegionOptions/DynamicGroup.lua index 559b3b0..d28eb16 100644 --- a/WeakAurasOptions/RegionOptions/DynamicGroup.lua +++ b/WeakAurasOptions/RegionOptions/DynamicGroup.lua @@ -207,6 +207,7 @@ local function createOptions(id, data) }, rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Start Angle"], order = 5, @@ -224,6 +225,7 @@ local function createOptions(id, data) }, arcLength = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Total Angle"], order = 8, @@ -235,6 +237,7 @@ local function createOptions(id, data) }, radius = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Radius"], order = 9, @@ -260,6 +263,7 @@ local function createOptions(id, data) }, gridWidth = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = function() if not data.gridType then return "" end @@ -277,6 +281,7 @@ local function createOptions(id, data) }, rowSpace = { type = "range", + control = "WeakAurasSpinBox", name = L["Row Space"], width = WeakAuras.normalWidth, order = 10, @@ -287,6 +292,7 @@ local function createOptions(id, data) }, columnSpace = { type = "range", + control = "WeakAurasSpinBox", name = L["Column Space"], width = WeakAuras.normalWidth, order = 11, @@ -298,6 +304,7 @@ local function createOptions(id, data) -- generic grow options space = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Space"], order = 7, @@ -312,6 +319,7 @@ local function createOptions(id, data) }, stagger = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Stagger"], order = 8, @@ -387,6 +395,7 @@ local function createOptions(id, data) }, limit = { type = "range", + control = "WeakAurasSpinBox", order = 26, width = WeakAuras.normalWidth, name = L["Limit"], @@ -404,6 +413,7 @@ local function createOptions(id, data) }, scale = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Group Scale"], order = 28, diff --git a/WeakAurasOptions/RegionOptions/Group.lua b/WeakAurasOptions/RegionOptions/Group.lua index 0735854..38a5374 100644 --- a/WeakAurasOptions/RegionOptions/Group.lua +++ b/WeakAurasOptions/RegionOptions/Group.lua @@ -190,6 +190,7 @@ local function createDistributeAlignOptions(id, data) }, distribute_h = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Distribute Horizontally"], order = 20, @@ -273,6 +274,7 @@ local function createDistributeAlignOptions(id, data) }, distribute_v = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Distribute Vertically"], order = 25, @@ -356,6 +358,7 @@ local function createDistributeAlignOptions(id, data) }, space_h = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Space Horizontally"], order = 30, @@ -439,6 +442,7 @@ local function createDistributeAlignOptions(id, data) }, space_v = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Space Vertically"], order = 35, @@ -560,6 +564,7 @@ local function createOptions(id, data) -- Alignment/Distribute options are added below scale = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Group Scale"], order = 45, diff --git a/WeakAurasOptions/RegionOptions/Icon.lua b/WeakAurasOptions/RegionOptions/Icon.lua index b05c7a6..5bdccac 100644 --- a/WeakAurasOptions/RegionOptions/Icon.lua +++ b/WeakAurasOptions/RegionOptions/Icon.lua @@ -124,6 +124,7 @@ local function createOptions(id, data) }, alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Alpha"], order = 7.03, @@ -135,6 +136,7 @@ local function createOptions(id, data) }, zoom = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Zoom"], order = 7.04, @@ -153,6 +155,7 @@ local function createOptions(id, data) }, iconInset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Icon Inset"], order = 7.06, diff --git a/WeakAurasOptions/RegionOptions/Model.lua b/WeakAurasOptions/RegionOptions/Model.lua index ac33080..177404f 100644 --- a/WeakAurasOptions/RegionOptions/Model.lua +++ b/WeakAurasOptions/RegionOptions/Model.lua @@ -39,6 +39,7 @@ local function createOptions(id, data) }, sequence = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Animation Sequence"], min = 0, @@ -50,6 +51,7 @@ local function createOptions(id, data) }, model_z = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Z Offset"], softMin = -20, @@ -60,6 +62,7 @@ local function createOptions(id, data) }, model_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Offset"], softMin = -20, @@ -70,6 +73,7 @@ local function createOptions(id, data) }, model_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], softMin = -20, @@ -80,6 +84,7 @@ local function createOptions(id, data) }, rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Rotation"], min = 0, diff --git a/WeakAurasOptions/RegionOptions/ProgressTexture.lua b/WeakAurasOptions/RegionOptions/ProgressTexture.lua index 58db043..ea72c81 100644 --- a/WeakAurasOptions/RegionOptions/ProgressTexture.lua +++ b/WeakAurasOptions/RegionOptions/ProgressTexture.lua @@ -94,6 +94,7 @@ local function createOptions(id, data) }, backgroundOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Background Offset"], min = 0, @@ -137,6 +138,7 @@ local function createOptions(id, data) }, user_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, order = 42, name = L["Re-center X"], @@ -147,6 +149,7 @@ local function createOptions(id, data) }, user_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, order = 44, name = L["Re-center Y"], @@ -157,6 +160,7 @@ local function createOptions(id, data) }, startAngle = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, order = 42, name = L["Start Angle"], @@ -167,6 +171,7 @@ local function createOptions(id, data) }, endAngle = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, order = 44, name = L["End Angle"], @@ -177,6 +182,7 @@ local function createOptions(id, data) }, crop_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Crop X"], order = 46, @@ -194,6 +200,7 @@ local function createOptions(id, data) }, crop_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Crop Y"], order = 47, @@ -211,6 +218,7 @@ local function createOptions(id, data) }, rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Rotation"], order = 52, @@ -220,6 +228,7 @@ local function createOptions(id, data) }, alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Alpha"], order = 48, @@ -244,6 +253,7 @@ local function createOptions(id, data) }, slant = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Slant Amount"], order = 55.4, diff --git a/WeakAurasOptions/RegionOptions/StopMotion.lua b/WeakAurasOptions/RegionOptions/StopMotion.lua index 785867c..4588872 100644 --- a/WeakAurasOptions/RegionOptions/StopMotion.lua +++ b/WeakAurasOptions/RegionOptions/StopMotion.lua @@ -281,6 +281,7 @@ local function createOptions(id, data) }, startPercent = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Animation Start"], min = 0, @@ -291,6 +292,7 @@ local function createOptions(id, data) }, endPercent = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Animation End"], min = 0, @@ -301,6 +303,7 @@ local function createOptions(id, data) }, frameRate = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Frame Rate"], min = 3, @@ -518,6 +521,7 @@ local function createOptions(id, data) }, backgroundPercent = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Selected Frame"], min = 0, diff --git a/WeakAurasOptions/RegionOptions/Text.lua b/WeakAurasOptions/RegionOptions/Text.lua index 79137c8..01372e6 100644 --- a/WeakAurasOptions/RegionOptions/Text.lua +++ b/WeakAurasOptions/RegionOptions/Text.lua @@ -55,6 +55,7 @@ local function createOptions(id, data) }, fontSize = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Size"], order = 46, @@ -153,6 +154,7 @@ local function createOptions(id, data) }, shadowXOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Shadow X Offset"], softMin = -15, @@ -163,6 +165,7 @@ local function createOptions(id, data) }, shadowYOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Shadow Y Offset"], softMin = -15, @@ -215,6 +218,7 @@ local function createOptions(id, data) width = WeakAuras.normalWidth, order = 49.1, type = "range", + control = "WeakAurasSpinBox", min = 1, softMax = screenWidth, bigStep = 1, diff --git a/WeakAurasOptions/RegionOptions/Texture.lua b/WeakAurasOptions/RegionOptions/Texture.lua index 0d34887..6eb03a0 100644 --- a/WeakAurasOptions/RegionOptions/Texture.lua +++ b/WeakAurasOptions/RegionOptions/Texture.lua @@ -69,6 +69,7 @@ local function createOptions(id, data) }, alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Alpha"], order = 25, @@ -85,6 +86,7 @@ local function createOptions(id, data) }, rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Rotation"], min = 0, @@ -96,6 +98,7 @@ local function createOptions(id, data) }, discrete_rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Discrete Rotation"], min = 0, diff --git a/WeakAurasOptions/SubRegionOptions/Border.lua b/WeakAurasOptions/SubRegionOptions/Border.lua index eb7f30a..4647a3c 100644 --- a/WeakAurasOptions/SubRegionOptions/Border.lua +++ b/WeakAurasOptions/SubRegionOptions/Border.lua @@ -33,6 +33,7 @@ local function createOptions(parentData, data, index, subIndex) }, border_offset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Border Offset"], order = 5, @@ -42,6 +43,7 @@ local function createOptions(parentData, data, index, subIndex) }, border_size = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Border Size"], order = 6, diff --git a/WeakAurasOptions/SubRegionOptions/Glow.lua b/WeakAurasOptions/SubRegionOptions/Glow.lua index aab4deb..1327ecf 100644 --- a/WeakAurasOptions/SubRegionOptions/Glow.lua +++ b/WeakAurasOptions/SubRegionOptions/Glow.lua @@ -134,6 +134,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowLines = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Lines & Particles"], order = 9, @@ -144,6 +145,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowFrequency = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Frequency"], order = 10, @@ -161,6 +163,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowLength = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Length"], order = 12, @@ -171,6 +174,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowThickness = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Thickness"], order = 13, @@ -188,6 +192,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowXOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["X-Offset"], order = 15, @@ -198,6 +203,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowYOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y-Offset"], order = 16, @@ -215,6 +221,7 @@ local function createOptions(parentData, data, index, subIndex) }, glowScale = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Scale"], order = 18, diff --git a/WeakAurasOptions/SubRegionOptions/Model.lua b/WeakAurasOptions/SubRegionOptions/Model.lua index cd36f2b..0d3bb75 100644 --- a/WeakAurasOptions/SubRegionOptions/Model.lua +++ b/WeakAurasOptions/SubRegionOptions/Model.lua @@ -42,6 +42,7 @@ local function createOptions(parentData, data, index, subIndex) }, extra_width = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Extra Width"], order = 12.1, @@ -52,6 +53,7 @@ local function createOptions(parentData, data, index, subIndex) }, extra_height = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Extra Height"], order = 12.2, @@ -62,6 +64,7 @@ local function createOptions(parentData, data, index, subIndex) }, model_alpha = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Alpha"], order = 13, @@ -71,6 +74,7 @@ local function createOptions(parentData, data, index, subIndex) }, model_z = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Z Offset"], softMin = -20, @@ -81,6 +85,7 @@ local function createOptions(parentData, data, index, subIndex) }, model_x = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["X Offset"], softMin = -20, @@ -91,6 +96,7 @@ local function createOptions(parentData, data, index, subIndex) }, model_y = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], softMin = -20, @@ -101,6 +107,7 @@ local function createOptions(parentData, data, index, subIndex) }, rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Rotation"], min = 0, diff --git a/WeakAurasOptions/SubRegionOptions/SubText.lua b/WeakAurasOptions/SubRegionOptions/SubText.lua index b112c3b..e50f748 100644 --- a/WeakAurasOptions/SubRegionOptions/SubText.lua +++ b/WeakAurasOptions/SubRegionOptions/SubText.lua @@ -68,6 +68,7 @@ local function createOptions(parentData, data, index, subIndex) }, text_fontSize = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Size"], order = 14, @@ -159,6 +160,7 @@ local function createOptions(parentData, data, index, subIndex) }, text_shadowXOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["Shadow X Offset"], softMin = -15, @@ -169,6 +171,7 @@ local function createOptions(parentData, data, index, subIndex) }, text_shadowYOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Shadow Y Offset"], softMin = -15, @@ -227,6 +230,7 @@ local function createOptions(parentData, data, index, subIndex) width = WeakAuras.normalWidth - indentWidth, order = 53, type = "range", + control = "WeakAurasSpinBox", min = 1, softMax = 200, bigStep = 1, @@ -353,6 +357,7 @@ local function createOptions(parentData, data, index, subIndex) options.text_anchorXOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth - indentWidth, name = L["X Offset"], order = 60.4, @@ -364,6 +369,7 @@ local function createOptions(parentData, data, index, subIndex) options.text_anchorYOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Y Offset"], order = 60.5, diff --git a/WeakAurasOptions/SubRegionOptions/Tick.lua b/WeakAurasOptions/SubRegionOptions/Tick.lua index 2b31060..229b69b 100644 --- a/WeakAurasOptions/SubRegionOptions/Tick.lua +++ b/WeakAurasOptions/SubRegionOptions/Tick.lua @@ -43,6 +43,7 @@ local function createOptions(parentData, data, index, subIndex) }, tick_thickness = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Thickness"], order = 5, @@ -107,6 +108,7 @@ local function createOptions(parentData, data, index, subIndex) }, tick_length = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Length"], order = 8, @@ -170,6 +172,7 @@ local function createOptions(parentData, data, index, subIndex) }, tick_rotation = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["Rotation"], min = 0, @@ -187,6 +190,7 @@ local function createOptions(parentData, data, index, subIndex) }, tick_xOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["x-Offset"], order = 16, @@ -196,6 +200,7 @@ local function createOptions(parentData, data, index, subIndex) }, tick_yOffset = { type = "range", + control = "WeakAurasSpinBox", width = WeakAuras.normalWidth, name = L["y-Offset"], order = 17, diff --git a/WeakAurasOptions/WeakAurasOptions.toc b/WeakAurasOptions/WeakAurasOptions.toc index 0f0f7d3..7eecc59 100644 --- a/WeakAurasOptions/WeakAurasOptions.toc +++ b/WeakAurasOptions/WeakAurasOptions.toc @@ -1,7 +1,7 @@ ## Interface: 30300 ## Title: WeakAuras Options ## Author: The WeakAuras Team -## Version: 4.0.0 +## Version: 4.1.1 ## Notes: Options for WeakAuras ## Notes-esES: Opciones para WeakAuras ## Notes-deDE: Optionen für WeakAuras @@ -81,15 +81,17 @@ AceGUI-Widgets\AceGUIWidget-WeakAurasPendingUpdateButton.lua AceGUI-Widgets\AceGUIWidget-WeakAurasTextureButton.lua AceGUI-Widgets\AceGUIWidget-WeakAurasIconButton.lua AceGUI-Widgets\AceGUIWidget-WeakAurasMultiLineEditBox.lua +AceGUI-Widgets\AceGUIWidget-WeakAurasMultiLineEditBoxWithEnter.lua AceGUI-Widgets\AceGUIWidget-WeakAurasNewButton.lua AceGUI-Widgets\AceGUIWidget-WeakAurasImportButton.lua -AceGUI-Widgets\AceGUIWidget-WeakAurasSortedDropDown.lua AceGUI-Widgets\AceGUIWidget-WeakAurasToolbarButton.lua AceGUI-Widgets\AceGUIWidget-WeakAurasTwoColumnDropDown.lua AceGUI-Widgets\AceGUIWidget-WeakAurasSnippetButton.lua +AceGUI-Widgets\AceGUIWidget-WeakAurasAnchorButtons.lua AceGUI-Widgets\AceGUIContainer-WeakAurasTreeGroup.lua -AceGUI-Widgets\AceGUIWidget-WeakAurasSnippetButton.lua AceGUI-Widgets\AceGUIContainer-WeakAurasInlineGroup.lua AceGUI-Widgets\AceGUIWidget-WeakAurasExpandAnchor.lua AceGUI-Widgets\AceGUIWidget-WeakAurasSpacer.lua AceGUI-Widgets\AceGuiWidget-WeakAurasProgressBar.lua +AceGUI-Widgets\AceGUIWidget-WeakAurasSpinBox.lua +AceGUI-Widgets\AceGUIWidget-WeakAurasInputFocus.lua