From d8b2801671a38a44e6abe37c3bd0c6b5c76e76fd Mon Sep 17 00:00:00 2001 From: Sattva <74269253+Sattva-108@users.noreply.github.com> Date: Wed, 22 Jan 2025 00:22:48 +0300 Subject: [PATCH] Minimap - Hide Addon Buttons - Mouseover Make mouseovering minimap itself to show buttons. --- Changelog and Notes.txt | 2 -- Leatrix_Plus.lua | 11 +++++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Changelog and Notes.txt b/Changelog and Notes.txt index 6ceb37e..b79d334 100644 --- a/Changelog and Notes.txt +++ b/Changelog and Notes.txt @@ -24,8 +24,6 @@ Manage Debuffs - Test IT in fight. -- What i plan to do in near future list from easy to hard -------------------------------------------------------------------------------- -Minimap - Hide POI ARROWS Tweak. - Minimap - show time by user option. MinimapButton - Add functions to alt-click and other clicks on button (prio - error text togggle) diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index ff51186..bfe361b 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -6013,6 +6013,7 @@ function LeaPlusLC:Player() Minimap:HookScript("OnUpdate", function(self, elapsed) local numChildren = Minimap:GetNumChildren() local mouseOverChild = false + local mouseOverMinimap = Minimap:IsMouseOver() -- Check if the mouse is over the minimap for i = 1, numChildren do local child = select(i, Minimap:GetChildren()) if child and child:IsObjectType("Button") then @@ -6031,10 +6032,11 @@ function LeaPlusLC:Player() end end - if not mouseOverChild then - HideMinimapButtons() - else + -- If the mouse is over either the minimap or a child, show the buttons + if mouseOverMinimap or mouseOverChild then ShowMinimapButtons() + else + HideMinimapButtons() end end) end @@ -6465,8 +6467,9 @@ function LeaPlusLC:Player() end) end + + -- Hide POI arrows local function SetupPOI() - -- Hide POI arrows if LeaPlusLC["HideMiniPOIArrows"] == "On" then Minimap:SetStaticPOIArrowTexture("Interface\\addons\\Leatrix_Plus\\assets\\ROTATING-MINIMAPARROW") else