From 940fd2e5f91d9cb3e973bc45bdb59d594cbfdfdd Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Wed, 2 Apr 2025 10:20:37 +0200 Subject: [PATCH] add ChatFrame Stratafix into the addon --- .luacheckrc | 2 +- WeakAuras/Compatibility.lua | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.luacheckrc b/.luacheckrc index 07ba718..7dc9d50 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -19568,5 +19568,5 @@ globals = { "WA_UpdateNineSliceBorders", "SecondsToMinutes", "MinutesToSeconds", "HasTimePassed", "SecondsFormatterConstants", "ConvertSecondsToUnits", "SecondsToClock", "MinutesToTime", "FormatShortDate", "NUMBER_ABBREVIATION_DATA", "WeakAurasProfilingReportTitleText", - "WeakAurasRealTimeProfiling", "WeakAurasRealTimeProfilingTitleText", "seconds" + "WeakAurasRealTimeProfiling", "WeakAurasRealTimeProfilingTitleText", "seconds", "NUM_CHAT_WINDOWS" } diff --git a/WeakAuras/Compatibility.lua b/WeakAuras/Compatibility.lua index 01282c6..c283052 100644 --- a/WeakAuras/Compatibility.lua +++ b/WeakAuras/Compatibility.lua @@ -157,3 +157,13 @@ end function FrameDeltaLerp(startValue, endValue, amount, elapsed) return DeltaLerp(startValue, endValue, amount, elapsed); end + +-- Fix FrameStrata of ChatFrame +for i = 1, NUM_CHAT_WINDOWS do + local chatFrame = _G["ChatFrame" .. i] + if chatFrame and type(chatFrame.GetFrameStrata) == "function" and type(chatFrame.SetFrameStrata) == "function" then + if chatFrame:GetFrameStrata() == "BACKGROUND" then + chatFrame:SetFrameStrata("MEDIUM") + end + end +end