Hide MacroText works again
This commit is contained in:
@@ -118,6 +118,7 @@ function Bartender4.Button:Create(id, parent)
|
|||||||
--self:UpdateAction(true)
|
--self:UpdateAction(true)
|
||||||
button:UpdateHotkeys()
|
button:UpdateHotkeys()
|
||||||
button:UpdateUsable()
|
button:UpdateUsable()
|
||||||
|
button:ToggleButtonElements()
|
||||||
|
|
||||||
return button
|
return button
|
||||||
end
|
end
|
||||||
@@ -254,6 +255,11 @@ function Button:GetActionID()
|
|||||||
return self.action
|
return self.action
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Button:Update()
|
||||||
|
self:UpdateAction(true)
|
||||||
|
self:ToggleButtonElements()
|
||||||
|
end
|
||||||
|
|
||||||
function Button:UpdateAction(force)
|
function Button:UpdateAction(force)
|
||||||
if force then
|
if force then
|
||||||
self.action = 0
|
self.action = 0
|
||||||
@@ -261,6 +267,14 @@ function Button:UpdateAction(force)
|
|||||||
ActionButton_UpdateAction(self)
|
ActionButton_UpdateAction(self)
|
||||||
end
|
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
|
local orig_ActionButton_UpdateHotkeys = ActionButton_UpdateHotkeys
|
||||||
ActionButton_UpdateHotkeys = function(self, ...)
|
ActionButton_UpdateHotkeys = function(self, ...)
|
||||||
local name = self:GetName()
|
local name = self:GetName()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ local ButtonBar_MT = {__index = ButtonBar}
|
|||||||
local defaults = Bartender4:Merge({
|
local defaults = Bartender4:Merge({
|
||||||
padding = 2,
|
padding = 2,
|
||||||
rows = 1,
|
rows = 1,
|
||||||
|
hidemacrotext = false,
|
||||||
hidehotkey = false,
|
hidehotkey = false,
|
||||||
skin = {
|
skin = {
|
||||||
ID = "DreamLayout",
|
ID = "DreamLayout",
|
||||||
|
|||||||
Reference in New Issue
Block a user