from retail diffcheck complete

This commit is contained in:
NoM0Re
2025-02-15 18:09:04 +01:00
parent 586e4d02e4
commit 7a27fdae47
6 changed files with 49 additions and 25 deletions
@@ -1,5 +1,8 @@
if not WeakAuras.IsLibsOK() then return end
local AddonName, OptionsPrivate = ...
---@type string
local AddonName = ...
---@class OptionsPrivate
local OptionsPrivate = select(2, ...)
-- Lua APIs
local pairs = pairs
@@ -8,6 +11,7 @@ local pairs = pairs
local CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
= CreateFrame, IsMouseButtonDown, SetCursor, GetMouseFocus, MouseIsOver, ResetCursor
---@class WeakAuras
local WeakAuras = WeakAuras
local L = WeakAuras.L
@@ -37,7 +41,7 @@ function OptionsPrivate.StartFrameChooser(data, path)
local frame = OptionsPrivate.Private.OptionsFrame();
if not(frameChooserFrame) then
frameChooserFrame = CreateFrame("Frame");
frameChooserBox = CreateFrame("Frame", nil, frameChooserFrame);
frameChooserBox = CreateFrame("Frame", nil, frameChooserFrame, "BackdropTemplate");
frameChooserBox:SetFrameStrata("TOOLTIP");
frameChooserBox:SetBackdrop({
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
@@ -59,7 +63,13 @@ function OptionsPrivate.StartFrameChooser(data, path)
else
SetCursor("CAST_CURSOR");
local focus = GetMouseFocus();
local focus
if GetMouseFocus then
focus = GetMouseFocus()
elseif GetMouseFoci then
local foci = GetMouseFoci()
focus = foci[1] or nil
end
local focusName;
if(focus) then
@@ -61,6 +61,8 @@ local function ConstructIconPicker(frame)
subname = subname:lower();
end
local num = 0;
if(subname and subname ~= "") then
for name, icons in pairs(spellCache.Get()) do
@@ -61,10 +61,16 @@ local function ConstructImportExport(frame)
elseif(mode == "table") then
displayStr = OptionsPrivate.Private.DataToString(id, true);
end
input.editBox:SetMaxBytes(nil);
input.editBox:SetScript("OnEscapePressed", function() group:Close(); end);
input.editBox:SetScript("OnTextChanged", function() input:SetText(displayStr); input.editBox:HighlightText(); end);
input.editBox:SetScript("OnMouseUp", function() input.editBox:HighlightText(); end);
input.editBox:SetMaxBytes(nil); -- Dragonflight doesn't accept nil
input.editBox:SetScript("OnEscapePressed", function()
group:Close();
end);
input.editBox:SetScript("OnTextChanged", function()
input:SetText(displayStr); input.editBox:HighlightText();
end);
input.editBox:SetScript("OnMouseUp", function()
input.editBox:HighlightText();
end);
input:SetLabel(id.." - "..#displayStr);
input.button:Hide();
input:SetText(displayStr);
@@ -554,7 +554,6 @@ function OptionsPrivate.CreateFrame()
container.content:SetPoint("TOPLEFT", 0, -28)
container.content:SetPoint("BOTTOMRIGHT", 0, 0)
frame.container = container
frame.moversizer, frame.mover = OptionsPrivate.MoverSizer(frame)
-- filter line
+16 -11
View File
@@ -342,16 +342,17 @@ local function BuildUidMap(data, children, type)
-- Handle anchorFrameFrame
if data.anchorFrameType == "SELECTFRAME"
and data.anchorFrameFrame
and data.anchorFrameFrame:sub(1, 10) == "WeakAuras:"
then
local target = data.anchorFrameFrame:sub(11)
if idToUid[target] then
uidMap.map[data.uid].anchorFrameFrame = idToUid[target]
end
and data.anchorFrameFrame
and data.anchorFrameFrame:sub(1, 10) == "WeakAuras:"
then
local target = data.anchorFrameFrame:sub(11)
if idToUid[target] then
uidMap.map[data.uid].anchorFrameFrame = idToUid[target]
end
end
end
local function handleSortHybridTable(data)
if data.regionType == "dynamicgroup" then
local sortHybridTableByUid = {}
@@ -1564,7 +1565,7 @@ local methods = {
local flavorWarning = AceGUI:Create("Label")
flavorWarning:SetFontObject(GameFontHighlight)
flavorWarning:SetFullWidth(true)
flavorWarning:SetText(L["This aura was created with a different version (%s) of World of Warcraft.\nIt might not work correctly!"]:format(OptionsPrivate.Private.TocToExpansion[importBuild]))
flavorWarning:SetText(L["This aura was created with a different version (%s) of World of Warcraft.\nIt might not work correctly!"]:format(OptionsPrivate.Private.TocToExpansion[importBuild] or L["Unknown"]))
flavorWarning:SetColor(1, 0, 0)
self:AddChild(flavorWarning)
end
@@ -1939,12 +1940,14 @@ local methods = {
error("Can't remove root")
end
if (uidMap:GetGroupRegionType(uid) and removeGroups)
or (uidMap:GetGroupRegionType(uid) == nil and removeAuras)
then
if (uidMap:GetGroupRegionType(uid) and removeGroups)
or (uidMap:GetGroupRegionType(uid) == nil and removeAuras)
then
for index, childUid in ipairs_reverse(children) do
uidMap:UnsetParent(childUid)
end
local data = OptionsPrivate.Private.GetDataByUID(uid)
if not data then
error("Can't find data")
@@ -1983,9 +1986,11 @@ local methods = {
if (uidMap:GetGroupRegionType(uid) and removeGroups)
or (uidMap:GetGroupRegionType(uid) == nil and removeAuras)
then
for index, childUid in ipairs_reverse(children) do
uidMap:UnsetParent(childUid)
end
uidMap:Remove(uid)
self:IncProgress()
coroutine.yield()