Skip to content

Commit

Permalink
manually add PatTheMav's fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldpaw committed Oct 18, 2024
1 parent 7ad5364 commit 3a9168b
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions AzeriteUI/Components/Misc/Minimap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,53 @@ MinimapMod.CreateCustomElements = function(self)

self.mail = mail

-- Addon Compartment
if (ns.IsRetail) then
local addonCompartment = self.Objects.Addons
if (addonCompartment) then
local addons = CreateFrame("DropdownButton", nil, Minimap)
addons:SetPoint("BOTTOMRIGHT", -252, 43)
addons:SetSize(16, 16)

addons:SetupMenu(addonCompartment.menuGenerator)

local addonsAnchor = AnchorUtil.CreateAnchor("BOTTOMRIGHT", addons, "TOPLEFT", 0, 0)
addons:SetMenuAnchor(addonsAnchor)

addons:SetScript("OnEnter", function(self)
addons:SetAlpha(.95)

if (GameTooltip:IsForbidden()) then return end

GameTooltip_SetDefaultAnchor(GameTooltip, self)
GameTooltip_SetTitle(GameTooltip, ADDONS)
GameTooltip:Show()
end)

addons:SetScript("OnLeave", function(self)
addons:SetAlpha(.5)

if (GameTooltip:IsForbidden()) then return end

GameTooltip:Hide()
end)

local addonsText = addons:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
addonsText:SetText(addonCompartment:GetText())
addonsText:SetPoint("CENTER")
addons:SetFontString(addonsText)
addons.text = addonsText

hooksecurefunc(addonCompartment, "UpdateDisplay", function(self)
addonsText:SetText(self:GetText())
end)

addons:SetAlpha(.5)

self.addonCompartment = addons
end
end

local dropdown = nil

-- This is broken?
Expand Down

0 comments on commit 3a9168b

Please sign in to comment.