Add files via upload

This commit is contained in:
Relationship
2026-07-16 17:03:20 +01:00
committed by GitHub
parent fda04907c2
commit 4502a1db7e
3 changed files with 38 additions and 11 deletions
+10 -2
View File
@@ -66,8 +66,12 @@ end
function MM:Create()
if getglobal(BTN_NAME) then return getglobal(BTN_NAME) end
-- Parent to UIParent so we're not clipped to the minimap area.
local btn = CreateFrame("Button", BTN_NAME, UIParent)
-- Parent to Minimap so button-collector addons (MinimapButtonBag /
-- MBB, and similar) can discover and manage this button the same way
-- they discover Blizzard's built-in minimap buttons. SetPoint still
-- anchors to UIParent CENTER so the button can be dragged anywhere
-- on screen -- the anchor frame is independent of the parent frame.
local btn = CreateFrame("Button", BTN_NAME, Minimap)
btn:SetWidth(31); btn:SetHeight(31)
btn:SetFrameStrata("MEDIUM")
btn:SetFrameLevel(8)
@@ -75,6 +79,9 @@ function MM:Create()
btn:RegisterForClicks("LeftButtonUp", "RightButtonUp")
btn:RegisterForDrag("LeftButton", "RightButton")
btn:SetMovable(true)
-- MBB-friendly highlight so the button visually matches other
-- minimap buttons once it has been swept into the bag.
btn:SetHighlightTexture("Interface\\Minimap\\UI-Minimap-ZoomButton-Highlight")
-- Round border ring (standard minimap-button look)
local overlay = btn:CreateTexture(nil, "OVERLAY")
@@ -89,6 +96,7 @@ function MM:Create()
icon:SetPoint("TOPLEFT", btn, "TOPLEFT", 7, -6)
btn.icon = icon
btn:SetScript("OnClick", function()
if RA.UI and RA.UI.Toggle then RA.UI:Toggle() end
end)