From dffdfe91cf86b9913634641ec2fcd25d50af6c64 Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Thu, 20 Jun 2024 22:33:15 +0200 Subject: [PATCH] Limit when keyring changes update the art bar --- .luacheckrc | 1 + BlizzardArt.lua | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 67647b5..661771c 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -79,6 +79,7 @@ read_globals = { "HasExtraActionBar", "InCombatLockdown", "IsAddOnLoaded", + "IsKeyRingEnabled", "IsModifiedClick", "IsPetAttackAction", "MouseIsOver", diff --git a/BlizzardArt.lua b/BlizzardArt.lua index 8acdca4..354a3c3 100644 --- a/BlizzardArt.lua +++ b/BlizzardArt.lua @@ -120,12 +120,13 @@ function BlizzardArtMod:OnEnable() self:RegisterEvent("NEUTRAL_FACTION_SELECT_RESULT", "ApplyConfig") end - if MainMenuBar_UpdateKeyRing then + if MainMenuBar_UpdateKeyRing and (not IsKeyRingEnabled or IsKeyRingEnabled()) then self:SecureHook("MainMenuBar_UpdateKeyRing", "ApplyConfig") end end function BlizzardArtMod:ApplyConfig() + if InCombatLockdown() then return end self.bar:ApplyConfig() end @@ -282,7 +283,7 @@ function BlizzardArt:ApplyConfig() self.rightCap:SetTexCoord(1.0, 0.0, 0.0, 1.0) -- Horizontal mirror self.rightCap:ClearAllPoints() - local showKeyRing = KeyRingButton and GetCVarBool("showKeyring") or nil + local showKeyRing = KeyRingButton and (not IsKeyRingEnabled or IsKeyRingEnabled()) and GetCVarBool("showKeyring") or nil if config.artSkin == "HUMAN" then -- Lions on the background of buttons self.barTex0:SetTexture("Interface\\MainMenuBar\\UI-MainMenuBar-Human")