Skip to content

Commit

Permalink
Limit when keyring changes update the art bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Nevcairiel committed Jun 20, 2024
1 parent 1087f72 commit dffdfe9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ read_globals = {
"HasExtraActionBar",
"InCombatLockdown",
"IsAddOnLoaded",
"IsKeyRingEnabled",
"IsModifiedClick",
"IsPetAttackAction",
"MouseIsOver",
Expand Down
5 changes: 3 additions & 2 deletions BlizzardArt.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit dffdfe9

Please sign in to comment.