Skip to content

Commit

Permalink
Fix addon compartment for 11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanzilla committed Jul 24, 2024
1 parent e163a50 commit 7dfb29e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@
"UIMenuButtonStretchMixin",
"ToggleDropDownMenu",
"GetPrimaryTalentTree",
"GetTalentTabInfo"
"GetTalentTabInfo",
"MenuUtil"
],
"runtime.version": "Lua 5.1",
"workspace.ignoreDir": [
Expand Down
17 changes: 8 additions & 9 deletions WeakAuras/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ do
icon = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\icon.blp",
registerForAnyClick = true,
notCheckable = true,
func = function(btn, arg1, arg2, checked, mouseButton)
func = function(button, menuInputData, menu)
local mouseButton = menuInputData.buttonName
if mouseButton == "LeftButton" then
if IsShiftKeyDown() then
if not (WeakAuras.IsOptionsOpen()) then
Expand All @@ -500,15 +501,13 @@ do
WeakAurasProfilingFrame:Toggle()
end
end,
funcOnEnter = function()
GameTooltip:SetOwner(AddonCompartmentFrame, "ANCHOR_TOPRIGHT")
GameTooltip:SetText(AddonName)
GameTooltip:AddLine(WeakAuras.L["|cffeda55fLeft-Click|r to toggle showing the main window."], 1, 1, 1, true)
GameTooltip:Show()
WeakAuras.GenerateTooltip(true)
funcOnEnter = function(button)
MenuUtil.ShowTooltip(button, function(tooltip)

Check warning on line 505 in WeakAuras/Init.lua

View workflow job for this annotation

GitHub Actions / build

accessing undefined variable 'MenuUtil'
WeakAuras.GenerateTooltip(true, tooltip)
end)
end,
funcOnLeave = function()
GameTooltip:Hide()
funcOnLeave = function(button)
MenuUtil.HideTooltip(button)

Check warning on line 510 in WeakAuras/Init.lua

View workflow job for this annotation

GitHub Actions / build

accessing undefined variable 'MenuUtil'
end,
})
end
Expand Down
13 changes: 9 additions & 4 deletions WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1077,10 +1077,15 @@ function Private.CountWagoUpdates()
return updatedSlugsCount
end

local function tooltip_draw(isAddonCompartment)
local tooltip = GameTooltip;
tooltip:ClearLines();
tooltip:AddDoubleLine("WeakAuras", versionString);
local function tooltip_draw(isAddonCompartment, blizzardTooltip)
local tooltip
if isAddonCompartment then
tooltip = blizzardTooltip
else
tooltip = GameTooltip
end
tooltip:ClearLines()
tooltip:AddDoubleLine("WeakAuras", versionString)
if Private.CompanionData.slugs then
local count = Private.CountWagoUpdates()
if count > 0 then
Expand Down

0 comments on commit 7dfb29e

Please sign in to comment.