from retail

This commit is contained in:
Bunny67
2020-07-26 14:30:59 +03:00
parent 0e3999b8fd
commit ad5e1ed4d1
8 changed files with 121 additions and 71 deletions
+3 -3
View File
@@ -262,7 +262,7 @@ local function removeFuncs(intable, removeFunc)
intable[i] = nil;
elseif (i == "func" and removeFunc) then
intable[i] = nil
elseif(type(v) == "table" and i ~= "values") then
elseif(type(v) == "table" and i ~= "values" and i ~= "extraFunctions") then
removeFuncs(v, removeFunc)
end
end
@@ -1233,8 +1233,8 @@ local function AddCodeOption(args, data, name, prefix, url, order, hiddenFunc, p
extraFunctions = extraFunctions or {};
tinsert(extraFunctions, 1, {
buttonLabel = L["Expand"],
func = function()
WeakAuras.OpenTextEditor(data, path, encloseInFunction, multipath, reloadOptions, setOnParent, url)
func = function(info)
WeakAuras.OpenTextEditor(WeakAuras.GetPickedDisplay(), path, encloseInFunction, multipath, reloadOptions, setOnParent, url)
end
});
@@ -760,7 +760,7 @@ function WeakAuras.CreateFrame()
end
end
if (type(self.pickedDisplay) == "string" and self.pickedDisplay == id)
or (type(self.pickedDisplay == "table") and id == tempGroup.id)
or (type(self.pickedDisplay) == "table" and id == tempGroup.id)
then
frame:UpdateOptions()
end
@@ -1184,6 +1184,13 @@ function WeakAuras.CreateFrame()
self:FillOptions()
end
frame.GetPickedDisplay = function(self)
if type(self.pickedDisplay) == "string" then
return WeakAuras.GetData(self.pickedDisplay)
end
return self.pickedDisplay
end
frame:SetClampedToScreen(true)
local w, h = frame:GetSize()
local left, right, top, bottom = w/2,-w/2, 0, h-25
+4
View File
@@ -727,6 +727,10 @@ function WeakAuras.EnsureOptions(data, subOption)
return frame:EnsureOptions(data, subOption)
end
function WeakAuras.GetPickedDisplay()
return frame:GetPickedDisplay()
end
function WeakAuras.GetSpellTooltipText(id)
local tooltip = WeakAuras.GetHiddenTooltip();
tooltip:SetSpellByID(id);