From 1c881ef6739a9c55f75cc60dec48be04b9caacca Mon Sep 17 00:00:00 2001 From: andrew6180 <16847730+andrew6180@users.noreply.github.com> Date: Tue, 29 Jul 2025 09:16:04 -0700 Subject: [PATCH] Add popup to disable platebuffs or kui if both enabled --- Kui_Nameplates/Core/Config.lua | 18 +++++++++++++++++- Kui_Nameplates/Core/Core.lua | 4 ++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Kui_Nameplates/Core/Config.lua b/Kui_Nameplates/Core/Config.lua index 8ff5928..75ea2e6 100644 --- a/Kui_Nameplates/Core/Config.lua +++ b/Kui_Nameplates/Core/Config.lua @@ -1250,4 +1250,20 @@ do UpdateFrameSize ) end -end \ No newline at end of file +end + +StaticPopupDialogs.KUINAMEPLATES_INCOMPATIBLE = { + text = "KuiNameplates is not compatible with PlateBuffs. Please disable PlateBuffs or KuiNameplates.", + button1 = "Disable PlateBuffs", + button2 = "Disable KuiNameplates", + whileDead = 1, + OnButton1 = function() + DisableAddOn("PlateBuffs") + ReloadUI() + end, + OnButton2 = function() + DisableAddOn("KuiNameplates") + ReloadUI() + end, + hideOnEscape = 0, +} \ No newline at end of file diff --git a/Kui_Nameplates/Core/Core.lua b/Kui_Nameplates/Core/Core.lua index 1c2ee33..a7779e6 100644 --- a/Kui_Nameplates/Core/Core.lua +++ b/Kui_Nameplates/Core/Core.lua @@ -500,6 +500,10 @@ function addon:OnInitialize() -- on messages addon.Castbar = addon:GetModule("Castbar") addon.TankModule = addon:GetModule("TankMode") + + if IsAddOnLoaded("PlateBuffs") then + StaticPopup_Show("KUINAMEPLATES_INCOMPATIBLE") + end end ---------------------------------------------------------------------- enable -- function addon:OnEnable()