From 0ebc4c4ec1a1a42c840ade6adc17dcb5a156853f Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sun, 9 Nov 2008 13:33:39 +0100 Subject: [PATCH] Hide MacroText works again --- ActionButton.lua | 14 ++++++++++++++ ButtonBar.lua | 1 + 2 files changed, 15 insertions(+) diff --git a/ActionButton.lua b/ActionButton.lua index 919dd81..fe5a271 100644 --- a/ActionButton.lua +++ b/ActionButton.lua @@ -118,6 +118,7 @@ function Bartender4.Button:Create(id, parent) --self:UpdateAction(true) button:UpdateHotkeys() button:UpdateUsable() + button:ToggleButtonElements() return button end @@ -254,6 +255,11 @@ function Button:GetActionID() return self.action end +function Button:Update() + self:UpdateAction(true) + self:ToggleButtonElements() +end + function Button:UpdateAction(force) if force then self.action = 0 @@ -261,6 +267,14 @@ function Button:UpdateAction(force) ActionButton_UpdateAction(self) end +function Button:ToggleButtonElements() + if self.parent.config.hidemacrotext then + self.macroName:Hide() + else + self.macroName:Show() + end +end + local orig_ActionButton_UpdateHotkeys = ActionButton_UpdateHotkeys ActionButton_UpdateHotkeys = function(self, ...) local name = self:GetName() diff --git a/ButtonBar.lua b/ButtonBar.lua index 841230f..494b42f 100644 --- a/ButtonBar.lua +++ b/ButtonBar.lua @@ -7,6 +7,7 @@ local ButtonBar_MT = {__index = ButtonBar} local defaults = Bartender4:Merge({ padding = 2, rows = 1, + hidemacrotext = false, hidehotkey = false, skin = { ID = "DreamLayout",