Hide MacroText works again

This commit is contained in:
Hendrik Leppkes
2008-11-09 13:33:39 +01:00
parent 82af623c08
commit 0ebc4c4ec1
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -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()
+1
View File
@@ -7,6 +7,7 @@ local ButtonBar_MT = {__index = ButtonBar}
local defaults = Bartender4:Merge({
padding = 2,
rows = 1,
hidemacrotext = false,
hidehotkey = false,
skin = {
ID = "DreamLayout",