From 90f2b872d824f495074ff77a868f8e3c74f72fed Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sat, 7 Jun 2008 15:10:49 +0000 Subject: [PATCH] - hide the pet-bar AutoCastable texture when AutoCast is enabled (works around a crazy ButtonFacade design that showed it on top - back to blizzard behavior) - tweak stance bar code for classes that dont actually have a stance (yet) --- PetBar.lua | 8 ++++---- StanceBar.lua | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/PetBar.lua b/PetBar.lua index b6f4703..3c2ce82 100644 --- a/PetBar.lua +++ b/PetBar.lua @@ -205,14 +205,14 @@ function PetButtonPrototype:Update() self.isToken = isToken self.tooltipSubtext = subtext self:SetChecked(isActive and 1 or 0) - if autoCastAllowed then + if autoCastAllowed and not autoCastEnabled then self.autocastable:Show() - else + self.autocast:Hide() + elseif autoCastAllowed and autoCastEnabled then self.autocastable:Hide() - end - if autoCastEnabled then self.autocast:Show() else + self.autocastable:Hide() self.autocast:Hide() end diff --git a/StanceBar.lua b/StanceBar.lua index 41954d2..895c155 100644 --- a/StanceBar.lua +++ b/StanceBar.lua @@ -107,6 +107,10 @@ end function StanceBarMod:ApplyConfig() if not self:IsEnabled() then return end self.bar:ApplyConfig(self.db.profile) + + if GetNumShapeshiftForms() == 0 then + self:Disable() + end end function StanceBarMod:ReassignBindings() @@ -263,6 +267,7 @@ function StanceBar:UpdateStanceButtons() if updateBindings then StanceBarMod:ReassignBindings() end + self.disabled = (GetNumShapeshiftForms() == 0) and true or nil end function StanceBar:OnEvent(event, ...)