from retail

This commit is contained in:
NoM0Re
2025-01-05 16:59:33 +01:00
parent 8375cfa0a7
commit 40dcae7bcf
40 changed files with 54 additions and 120 deletions
@@ -1,9 +1,9 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local tinsert, tconcat, tremove, wipe = table.insert, table.concat, table.remove, wipe
local select, pairs, next, type, unpack = select, pairs, next, type, unpack
local tostring, error = tostring, error
local tinsert, tremove, wipe = table.insert, table.remove, wipe
local select, pairs, type, unpack = select, pairs, type, unpack
local error = error
local Type, Version = "WeakAurasDisplayButton", 59
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
@@ -9,7 +9,7 @@ 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 select, pairs, print = select, pairs, print
local select, pairs = select, pairs
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
@@ -10,7 +10,7 @@ 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 select, pairs, print = select, pairs, print
local select, pairs = select, pairs
-- WoW APIs
local CreateFrame, UIParent = CreateFrame, UIParent
@@ -3,7 +3,6 @@ if not WeakAuras.IsCorrectVersion() then
end
local AddonName, OptionsPrivate = ...
local L = WeakAuras.L
local pairs, next, type, unpack = pairs, next, type, unpack
+2 -16
View File
@@ -50,8 +50,6 @@ local AddonName, OptionsPrivate = ...
local WeakAuras = WeakAuras;
local L = WeakAuras.L;
local debug = false;
local function addSpace(args, order)
args["space" .. order] = {
type = "description",
@@ -64,18 +62,6 @@ local function addSpace(args, order)
return order;
end
local function addHalfSpace(args, order)
args["space" .. order] = {
type = "description",
name = "",
image = function() return "", 0, 0 end,
order = order,
width = WeakAuras.halfWidth
}
order = order + 1;
return order;
end
local function compareValues(a, b, propertytype)
if (propertytype == "color") then
if (type(a) ~= "table" or type(b) ~= "table") then
@@ -768,7 +754,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
args["condition" .. i .. "value" .. j] = {
type = "toggle",
width = WeakAuras.normalWidth,
name = blueIfNoValue(data, conditions[i].changes[j], "value", "message_dest_isunit", L["Is Unit"], L["Is Unit"]),
name = blueIfNoValue(data, conditions[i].changes[j], "value", "message_dest_isunit", L["Is Unit"]),
desc = descIfNoValue(data, conditions[i].changes[j], "value", "message_dest_isunit", propertyType),
order = order,
get = function()
@@ -792,7 +778,7 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
desc = descMessage,
order = order,
get = message_getter,
set = setValueComplex("message", true)
set = setValueComplex("message")
}
order = order + 1;
+2 -3
View File
@@ -318,7 +318,6 @@ local function GetCustomTriggerOptions(data, triggernum)
test = "function",
events = "table",
values = "table",
display = "string"
}
local function validateCustomVariables(variables)
@@ -491,10 +490,10 @@ local function GetGenericTriggerOptions(data, triggernum)
}
if (triggerType == "custom") then
WeakAuras.Mixin(options, GetCustomTriggerOptions(data, triggernum, trigger));
WeakAuras.Mixin(options, GetCustomTriggerOptions(data, triggernum));
elseif (OptionsPrivate.Private.category_event_prototype[triggerType]) then
local prototypeOptions;
local trigger, untrigger = data.triggers[triggernum].trigger, data.triggers[triggernum].untrigger;
local trigger = data.triggers[triggernum].trigger
if(OptionsPrivate.Private.event_prototypes[trigger.event]) then
prototypeOptions = OptionsPrivate.ConstructOptions(OptionsPrivate.Private.event_prototypes[trigger.event], data, 10, triggernum);
if (trigger.event == "Combat Log") then
@@ -6,9 +6,7 @@ local pairs = pairs
-- WoW APIs
local CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
= CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
= CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
local WeakAuras = WeakAuras
local L = WeakAuras.L
@@ -8,7 +8,6 @@ local pairs = pairs
local CreateFrame, GetSpellInfo = CreateFrame, GetSpellInfo
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
@@ -33,9 +32,6 @@ local function ConstructIconPicker(frame)
local function iconPickerFill(subname, doSort)
scroll:ReleaseChildren();
local distances = {};
local names = {};
-- Work around special numbers such as inf and nan
if (tonumber(subname)) then
local spellId = tonumber(subname);
@@ -1,11 +1,8 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
-- Lua APIs
local strtrim, strsub = strtrim, strsub
-- WoW APIs
local GetTime, CreateFrame = GetTime, CreateFrame
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
@@ -8,7 +8,6 @@ local rad = rad
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
@@ -7,8 +7,6 @@ local pairs = pairs
-- WoW APIs
local IsShiftKeyDown, CreateFrame = IsShiftKeyDown, CreateFrame
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
@@ -7,8 +7,8 @@ local pairs, type, error = pairs, type, error
local _G = _G
-- WoW APIs
local GetScreenWidth, GetScreenHeight, CreateFrame, GetAddOnInfo, PlaySound, IsAddOnLoaded, LoadAddOn, UnitName
= GetScreenWidth, GetScreenHeight, CreateFrame, GetAddOnInfo, PlaySound, IsAddOnLoaded, LoadAddOn, UnitName
local GetScreenWidth, GetScreenHeight, CreateFrame, GetAddOnInfo, UnitName
= GetScreenWidth, GetScreenHeight, CreateFrame, GetAddOnInfo, UnitName
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
@@ -9,7 +9,6 @@ local pairs, next, type = pairs, next, type
local CreateFrame = CreateFrame
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local WeakAuras = WeakAuras
local L = WeakAuras.L
+2 -2
View File
@@ -611,7 +611,7 @@ local function modifyThumbnail(parent, borderframe, data, fullModify, width, hei
end
if data then
local name, icon = WeakAuras.GetNameAndIcon(data)
local _, icon = WeakAuras.GetNameAndIcon(data)
borderframe:SetIcon(icon)
end
@@ -635,7 +635,7 @@ local function createIcon()
};
-- Create and configure thumbnail
local thumbnail = createThumbnail(UIParent);
local thumbnail = createThumbnail();
modifyThumbnail(UIParent, thumbnail, data, nil, 32, 18);
thumbnail:SetIcon("Interface\\Icons\\INV_Sword_62");
@@ -557,7 +557,7 @@ local function modifyThumbnail(parent, frame, data)
end
local function createIcon()
local thumbnail = createThumbnail(UIParent)
local thumbnail = createThumbnail()
thumbnail.defaultIcon = createAnimatedDefaultIcon(thumbnail)
return thumbnail
end
+4 -4
View File
@@ -455,7 +455,7 @@ local function createDistributeAlignOptions(id, data)
end
local spaced;
local previousData;
for index, childId in pairs(data.controlledChildren) do
for _, childId in pairs(data.controlledChildren) do
local childData = WeakAuras.GetData(childId);
if(childData) then
local _, bottom, _, top = getRect(childData);
@@ -672,7 +672,7 @@ end
-- Modify preview thumbnail
local function modifyThumbnail(parent, frame, data)
function frame:SetIcon(path)
function frame:SetIcon()
if data.groupIcon then
local success = frame.icon:SetTexture(data.groupIcon)
if success then
@@ -693,12 +693,12 @@ local function modifyThumbnail(parent, frame, data)
frame.defaultIcon:Show()
end
frame:SetIcon(nil)
frame:SetIcon()
end
-- Create "new region" preview
local function createIcon()
local thumbnail = createThumbnail(UIParent)
local thumbnail = createThumbnail()
thumbnail.defaultIcon = createDefaultIcon(thumbnail)
return thumbnail
end
+2 -2
View File
@@ -188,8 +188,8 @@ local function createIcon()
width = 40
};
local thumbnail = createThumbnail(UIParent);
modifyThumbnail(UIParent, thumbnail, data, nil, 50);
local thumbnail = createThumbnail();
modifyThumbnail(UIParent, thumbnail, data);
return thumbnail;
end
@@ -713,7 +713,7 @@ local function createIcon()
backgroundColor = {0.5, 0.5, 0.5, 0.5}
};
local thumbnail = createThumbnail(UIParent);
local thumbnail = createThumbnail();
modifyThumbnail(UIParent, thumbnail, data, nil, 32);
thumbnail.elapsed = 0;
@@ -689,7 +689,7 @@ local function createIcon()
animationType = "progress"
};
local thumbnail = createThumbnail(UIParent);
local thumbnail = createThumbnail();
modifyThumbnail(UIParent, thumbnail, data, nil, 75);
thumbnail.elapsed = 0;
+3 -3
View File
@@ -4,7 +4,7 @@ local AddonName, OptionsPrivate = ...
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local screenWidth = math.ceil(GetScreenWidth() / 20) * 20
local indentWidth = 0.15
local hiddenFontExtra = function()
@@ -294,7 +294,7 @@ local function createOptions(id, data)
end
local total, index = 0, 1
for child in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
for _ in OptionsPrivate.Private.TraverseLeafsOrAura(data) do
total = total + 1
end
@@ -414,7 +414,7 @@ local function createIcon()
displayText = "World\nof\nWarcraft";
};
local thumbnail = createThumbnail(UIParent);
local thumbnail = createThumbnail();
modifyThumbnail(UIParent, thumbnail, data);
thumbnail.mask:SetPoint("BOTTOMLEFT", thumbnail, "BOTTOMLEFT", 3, 3);
thumbnail.mask:SetPoint("TOPRIGHT", thumbnail, "TOPRIGHT", -3, -3);
+1 -1
View File
@@ -190,7 +190,7 @@ local function createIcon()
rotation = 0;
};
local thumbnail = createThumbnail(UIParent);
local thumbnail = createThumbnail();
modifyThumbnail(UIParent, thumbnail, data, nil, 50);
return thumbnail;
@@ -4,7 +4,6 @@ local L = WeakAuras.L;
do
local function subCreateOptions(parentData, data, index, subIndex)
local order = 9
local options = {
__title = L["Background"],
__order = 1,
@@ -32,7 +31,6 @@ end
do
local function subCreateOptions(parentData, data, index, subIndex)
local order = 9
local options = {
__title = L["Foreground"],
__order = 1,
@@ -1,11 +1,8 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local function createOptions(parentData, data, index, subIndex)
local options = {
__title = L["Border %s"]:format(subIndex),
@@ -1,15 +1,10 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
local indentWidth = 0.15
local function createOptions(parentData, data, index, subIndex)
local hiddenGlowExtra = function()
@@ -1,7 +1,6 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local function createOptions(parentData, data, index, subIndex)
@@ -1,7 +1,6 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local SharedMedia = LibStub("LibSharedMedia-3.0")
local L = WeakAuras.L
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20
@@ -1,11 +1,8 @@
if not WeakAuras.IsCorrectVersion() or not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
local SharedMedia = LibStub("LibSharedMedia-3.0");
local L = WeakAuras.L;
local indentWidth = WeakAuras.normalWidth * 0.06
local function createOptions(parentData, data, index, subIndex)
local hiddentickextras = function()
return OptionsPrivate.IsCollapsed("subtext", "subtext", "tickextras" .. index, true)
-1
View File
@@ -29,7 +29,6 @@ end
local function GetGlobalOptions(data)
local triggerCount = 0
local globalTriggerOptions = {
__title = L["Trigger Combination"],
__order = 1,
+2 -2
View File
@@ -3,8 +3,8 @@ local AddonName, OptionsPrivate = ...
-- Lua APIs
local tinsert, tremove, wipe = table.insert, table.remove, wipe
local pairs, type, unpack = pairs, type, unpack
local loadstring, error = loadstring, error
local pairs, type = pairs, type
local error = error
local coroutine = coroutine
local _G = _G