minimap-tweaks: mousewheel scrolling and others

This commit is contained in:
shagu
2021-08-24 17:16:03 +02:00
parent 7de12aa973
commit 17d8950552
+27
View File
@@ -0,0 +1,27 @@
local _G = _G or getfenv(0)
local GetExpansion = ShaguTweaks.GetExpansion
local module = ShaguTweaks:register({
title = "Enable Minimap Tweaks",
description = "Hide unnecessary minimap buttons and allow to zoom via mousewheel",
enabled = nil,
})
module.enable = function(self)
-- hide daytime circle
GameTimeFrame:Hide()
GameTimeFrame:SetScript("OnShow", function() this:Hide() end)
-- hide minimap zone background
MinimapBorderTop:Hide()
MinimapToggleButton:Hide()
MinimapZoneTextButton:SetPoint("CENTER", 7, 85)
-- hide zoom buttons and enable mousewheel
MinimapZoomIn:Hide()
MinimapZoomOut:Hide()
Minimap:EnableMouseWheel(true)
Minimap:SetScript("OnMouseWheel", function()
if(arg1 > 0) then Minimap_ZoomIn() else Minimap_ZoomOut() end
end)
end