From 48e68d1499394ad7d3f066c5aa9e5c99c83f417e Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Tue, 11 Nov 2008 08:44:08 +0100 Subject: [PATCH] Fix display of Leave Vehicle button --- ActionButton.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ActionButton.lua b/ActionButton.lua index 4d98eb0..df19b15 100644 --- a/ActionButton.lua +++ b/ActionButton.lua @@ -82,8 +82,16 @@ function Bartender4.Button:Create(id, parent) if special then self:SetAttribute("type", "macro") self:SetAttribute("macrotext", special) + if not self:GetAttribute("isSpecial") then + self:SetAttribute("showgrid", self:GetAttribute("showgrid") + 1) + self:SetAttribute("isSpecial", true) + end else self:SetAttribute("type", "action") + if self:GetAttribute("isSpecial") then + self:SetAttribute("isSpecial", nil) + self:SetAttribute("showgrid", max(0, self:GetAttribute("showgrid") - 1)) + end end self:SetAttribute("action", action) @@ -201,6 +209,8 @@ end local function updateSpecialIcon(self) if self.BT4init and self.action and specialButtons[self.action] then self.icon:SetTexture(specialButtons[self.action].icon) + self.icon:Show() + self:UpdateUsable() end end hooksecurefunc("ActionButton_Update", updateSpecialIcon)