diff --git a/Button.lua b/Button.lua index d53fb66..0eacfdf 100644 --- a/Button.lua +++ b/Button.lua @@ -416,6 +416,7 @@ function Button:ShowButton() end function Button:HideButton() + if not self.Proxy:IsShown() then return end self.textureCache.pushed = self.pushedTexture:GetTexture() self.textureCache.highlight = self.highlightTexture:GetTexture() diff --git a/MicroMenu.lua b/MicroMenu.lua index 30a719d..96134c2 100644 --- a/MicroMenu.lua +++ b/MicroMenu.lua @@ -48,11 +48,10 @@ function MicroMenuMod:OnEnable() -- TODO: real start position self.bar:SetPoint("CENTER") - - self.bar:ApplyConfig(self.db.profile) end self.bar.disabled = nil self:ToggleOptions() + self.bar:ApplyConfig(self.db.profile) end function MicroMenuMod:OnDisable() diff --git a/StanceBar.lua b/StanceBar.lua index d338426..12e889e 100644 --- a/StanceBar.lua +++ b/StanceBar.lua @@ -31,7 +31,6 @@ function StanceBarMod:OnEnable() self.bar = setmetatable(Bartender4.ButtonBar:Create("Stance", nil, self.db.profile), {__index = StanceBar}) self.bar:ClearSetPoint("CENTER") - self.bar:ApplyConfig() self.bar:SetScript("OnEvent", StanceBar.OnEvent) end self:ToggleOptions() @@ -41,9 +40,10 @@ function StanceBarMod:OnEnable() self.bar:RegisterEvent("SPELL_UPDATE_USABLE") self.bar:RegisterEvent("PLAYER_AURAS_CHANGED") self.bar:RegisterEvent("PLAYER_REGEN_ENABLED") - self.bar:Show() + self.bar:RegisterEvent("ACTIONBAR_PAGE_CHANGED") self:RegisterEvent("UPDATE_BINDINGS", "ReassignBindings") self:ReassignBindings() + self.bar:ApplyConfig(self.db.profile) end function StanceBarMod:OnDisable() @@ -121,7 +121,7 @@ function StanceButtonPrototype:Update() local id = self:GetID() local texture, name, isActive, isCastable = GetShapeshiftFormInfo(id) - self.icon:SetTexture(texture); + self.icon:SetTexture(texture) -- manage cooldowns if texture then @@ -132,13 +132,13 @@ function StanceButtonPrototype:Update() local start, duration, enable = GetShapeshiftFormCooldown(id) CooldownFrame_SetTimer(self.cooldown, start, duration, enable) - if ( isActive ) then + if isActive then self:SetChecked(1) else self:SetChecked(0) end - if ( isCastable ) then + if isCastable then self.icon:SetVertexColor(1.0, 1.0, 1.0) else self.icon:SetVertexColor(0.4, 0.4, 0.4) @@ -202,8 +202,8 @@ function StanceBarMod:CreateStanceButton(id) button.cooldown = _G[button:GetName() .. "Cooldown"] button.normalTexture = button:GetNormalTexture() button.normalTexture:SetTexture("") - button.checkedTexture = button:GetCheckedTexture() - button.checkedTexture:SetTexture("") +-- button.checkedTexture = button:GetCheckedTexture() +-- button.checkedTexture:SetTexture("") button.OnEnter = button:GetScript("OnEnter") button:SetScript("OnEnter", onEnter) @@ -256,9 +256,9 @@ function StanceBar:UpdateStanceButtons() end function StanceBar:OnEvent(event, ...) - if InCombatLockdown() then - self:ForAll("Update") - else + if event == "PLAYER_ENTERING_WORLD" or event == "UPDATE_SHAPESHIFT_FORMS" and not InCombatLockdown() then self:UpdateStanceButtons() + else + self:ForAll("Update") end end