From 17d89505525bb22c0a99cb6578560c4c43c91397 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 24 Aug 2021 17:16:03 +0200 Subject: [PATCH] minimap-tweaks: mousewheel scrolling and others --- mods/minimap-tweaks.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mods/minimap-tweaks.lua diff --git a/mods/minimap-tweaks.lua b/mods/minimap-tweaks.lua new file mode 100644 index 0000000..fa8b9ca --- /dev/null +++ b/mods/minimap-tweaks.lua @@ -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