from retail

This commit is contained in:
NoM0Re
2025-01-16 21:11:14 +01:00
parent ba4039dae2
commit ec42e803b4
8 changed files with 186 additions and 141 deletions
@@ -71,54 +71,12 @@ local methods = {
self.menu = {}
self.frame:SetScript("OnMouseUp", function()
Hide_Tooltip()
self:SetMenu()
EasyMenu(self.menu, WeakAuras_DropDownMenu, self.frame, 0, 0, "MENU")
end)
self.frame:SetScript("OnEnter", function()
self:SetNormalTooltip()
Show_Long_Tooltip(self.frame, self.frame.description)
end)
self.frame:SetScript("OnLeave", Hide_Tooltip)
end,
["SetMenu"] = function(self)
wipe(self.menu)
for auraId in pairs(self.linkedAuras) do
if not self.linkedChildren[auraId] then
tinsert(self.menu,
{
text = auraId,
notCheckable = true,
hasArrow = true,
menuList = {
{
text = L["Update"],
notCheckable = true,
func = function()
local auraData = WeakAuras.GetData(auraId)
if auraData then
local success, error = WeakAuras.Import(self.companionData.encoded, auraData)
if not success and error ~= nil then
WeakAuras.prettyPrint(error)
end
end
end
},
{
text = L["Ignore updates"],
notCheckable = true,
func = function()
StaticPopup_Show("WEAKAURAS_CONFIRM_IGNORE_UPDATES", "", "", auraId)
end
}
}
}
)
end
end
end,
["SetLogo"] = function(self, path)
self.frame.updateLogo.tex:SetTexture(path)
end,
-1
View File
@@ -205,7 +205,6 @@ local function CreateNameOptions(aura_options, data, trigger, size, isExactSpell
end,
validate = isExactSpellId and WeakAuras.ValidateNumeric or nil,
control = "WeakAurasInputFocus",
getWithFocus = function() return trigger[optionKey] and trigger[optionKey][i] or "" end
}
end
-- VALIDATE ?
+2 -2
View File
@@ -1158,7 +1158,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
if IsParentDynamicGroup() then
return true
end
return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "UIPARENT" or data.anchorFrameType == "MOUSE";
return data.anchorFrameType == "SCREEN" or data.anchorFrameType == "MOUSE";
else
return data.anchorFrameType == "MOUSE";
end
@@ -1175,7 +1175,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
if IsGroupByFrame() then
return true
end
if (data.anchorFrameType ~= "SCREEN" and data.anchorFrameType ~= "UIPARENT") then
if (data.anchorFrameType ~= "SCREEN") then
return true;
end
if (data.parent) then