From 7778e55eb67b084c3802f9267eff03102af35081 Mon Sep 17 00:00:00 2001 From: shagu Date: Tue, 3 Oct 2023 13:27:12 +0200 Subject: [PATCH] turtle-wow: disable turtle map if map is enabled --- modules/turtle-wow.lua | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 modules/turtle-wow.lua diff --git a/modules/turtle-wow.lua b/modules/turtle-wow.lua new file mode 100644 index 00000000..89846072 --- /dev/null +++ b/modules/turtle-wow.lua @@ -0,0 +1,27 @@ +-- Skip module initialization on every other client than TurtleWoW. +if not TargetHPText or not TargetHPPercText then return end + +pfUI:RegisterModule("turtle-wow", "vanilla", function () + local delay = CreateFrame("Frame") + delay:SetScript("OnUpdate", function() + if pfUI.map then + -- while pfUI map is loaded, disable turtle wows window-implementation + _G.WorldMapFrame_Maximize() + pfUI.map.loader:GetScript("OnEvent")() + + _G.WorldMapFrame_Minimize = function() return end + _G.WorldMapFrame_Maximize = function() return end + + _G.WorldMapFrameMaximizeButton.Show = function() return end + _G.WorldMapFrameMaximizeButton:Hide() + + _G.WorldMapFrameMinimizeButton.Show = function() return end + _G.WorldMapFrameMinimizeButton:Hide() + + WorldMapFrameTitle.Show = function() return end + WorldMapFrameTitle:Hide() + end + + this:Hide() + end) +end)