diff --git a/ZoneText.lua b/ZoneText.lua index fd99d27..d9f77f7 100644 --- a/ZoneText.lua +++ b/ZoneText.lua @@ -189,16 +189,21 @@ function mod:OnEnable() hooksecurefunc(MinimapZoneText, "SetParent", function() sm.core.font.SetParent(MinimapZoneText, sm.core.button) end) + zoneTextButton = CreateFrame("Button", "SexyMapZoneTextButton", Minimap, "BackdropTemplate") -- Create our own zone text else MinimapCluster.ZoneTextButton:SetParent(sm.core.button) MinimapCluster.BorderTop:SetParent(sm.core.button) + zoneTextButton = CreateFrame("Button", "SexyMapZoneTextButton", Minimap, "BackdropTemplate,SecureActionButtonTemplate") -- Create our own zone text + zoneTextButton:RegisterForClicks("LeftButtonDown", "LeftButtonUp") + zoneTextButton:SetAttribute("type1", "click") + zoneTextButton:SetAttribute("clickbutton1", MinimapCluster.ZoneTextButton) end - zoneTextButton = CreateFrame("Button", "SexyMapZoneTextButton", Minimap, "BackdropTemplate") -- Create our own zone text zoneTextButton:SetPoint("BOTTOM", Minimap, "TOP", mod.db.xOffset, mod.db.yOffset) zoneTextButton:SetClampedToScreen(true) zoneTextButton:SetClampRectInsets(4,-4,-4,4) -- Allow kissing the edge of the screen when hiding the backdrop border (size 4) zoneTextButton.oshow = function() end -- Silly workaround to prevent the MBB addon grabing this frame + zoneTextFont = zoneTextButton:CreateFontString() zoneTextFont:SetPoint("CENTER", zoneTextButton, "CENTER") zoneTextFont:SetJustifyH("CENTER")