From 58803009cd0ede07f0b7c55fe8191ebe73ec4a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20B=C3=B6ing?= Date: Sun, 23 Oct 2022 23:00:12 +0200 Subject: [PATCH] [fix] Automatically hide ECS frame when Blizzard Gear Manager is shown Fixes #214 --- Modules/Init.lua | 7 +++++++ Modules/Stats.lua | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/Modules/Init.lua b/Modules/Init.lua index f8c75f9..1446b02 100644 --- a/Modules/Init.lua +++ b/Modules/Init.lua @@ -87,5 +87,12 @@ function _Init.RegisterEvents(eventFrame) eventFrame:RegisterEvent("GROUP_ROSTER_UPDATE") -- Triggered whenever someone joins or leaves the group (party and raid) if ECS.IsWotlk then eventFrame:RegisterEvent("SOCKET_INFO_SUCCESS") -- Triggers whenever the player successfully sockets an item + + GearManagerDialog:SetScript("OnShow", function() + Stats:HideWindow() + end) + GearManagerDialog:SetScript("OnHide", function() + Stats:ShowWindow() + end) end end diff --git a/Modules/Stats.lua b/Modules/Stats.lua index a775fbb..5be4f31 100755 --- a/Modules/Stats.lua +++ b/Modules/Stats.lua @@ -134,6 +134,10 @@ function Stats:HideWindow() _Stats.frame:SetShown(false) end +function Stats:ShowWindow() + _Stats.frame:SetShown(true) +end + function Stats:GetFrame() return _Stats.frame end