Moved Hotkey and MacroText handling to the ButtonBar prototype and show the Hotkey on Pet and Stance Bar (default off)

This commit is contained in:
Hendrik Leppkes
2008-11-01 14:51:45 +01:00
parent f4ee55d1a4
commit 29f204b662
8 changed files with 78 additions and 46 deletions
+23
View File
@@ -7,6 +7,7 @@ local ButtonBar_MT = {__index = ButtonBar}
local defaults = Bartender4:Merge({
padding = 2,
rows = 1,
hidehotkey = false,
skin = {
ID = "DreamLayout",
Backdrop = true,
@@ -95,6 +96,28 @@ function ButtonBar:SetZoom(zoom)
self:UpdateButtonLayout()
end
function ButtonBar:SetHideMacroText(state)
if state ~= nil then
self.config.hidemacrotext = state
end
self:ForAll("Update")
end
function ButtonBar:GetHideMacroText()
return self.config.hidemacrotext
end
function ButtonBar:SetHideHotkey(state)
if state ~= nil then
self.config.hidehotkey = state
end
self:ForAll("Update")
end
function ButtonBar:GetHideHotkey()
return self.config.hidehotkey
end
local math_floor = math.floor
-- align the buttons and correct the size of the bar overlay frame
ButtonBar.button_width = 36