Skip to content

Commit

Permalink
Prevent other addons re-showing the MinimapBorderTop texture
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jan 21, 2024
1 parent 511c7aa commit 40fc7ec
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions SexyMap_Vanilla.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ sm.backdrop = {
mod.frame = CreateFrame("Frame")
mod.button = CreateFrame("Button")
mod.font = mod.button:CreateFontString()
mod.texture = mod.button:CreateTexture()
mod.frame:Hide()
mod.button:Hide()
mod.deepCopyHash = function(t)
Expand Down Expand Up @@ -547,8 +548,20 @@ function mod:SetupMap()
MinimapCompassTexture.Show = MinimapCompassTexture.Hide
end

MinimapToggleButton:Hide() -- Minimap "X" to close button
MinimapBorderTop:Hide()
-- Minimap "X" to close button
local MinimapToggleButton = MinimapToggleButton
sm.core.button.SetParent(MinimapToggleButton, sm.core.button)
hooksecurefunc(MinimapToggleButton, "SetParent", function()
sm.core.button.SetParent(MinimapToggleButton, sm.core.button)
end)

-- Border texture around the zone text and the "X" to close button
local MinimapBorderTop = MinimapBorderTop
sm.core.texture.SetParent(MinimapBorderTop, sm.core.button)
hooksecurefunc(MinimapBorderTop, "SetParent", function()
sm.core.texture.SetParent(MinimapBorderTop, sm.core.button)
end)

Minimap:RegisterForDrag("LeftButton")
Minimap:SetClampedToScreen(mod.db.clamp)
Minimap:SetScale(mod.db.scale or 1)
Expand Down

0 comments on commit 40fc7ec

Please sign in to comment.