- remove cyCircled support

- add preliminary ButtonFacade support (still some bugs in it)
- this also replaces the built-in skin selection for the bars (for now)
This commit is contained in:
Hendrik Leppkes
2008-04-11 17:14:46 +00:00
parent 8b4d98cce6
commit acbaae01eb
9 changed files with 47 additions and 122 deletions
+6 -23
View File
@@ -9,16 +9,21 @@ local ButtonBar_MT = {__index = ButtonBar}
local defaults = Bartender4:Merge({
padding = 2,
rows = 1,
style = "dream",
}, Bartender4.Bar.defaults)
Bartender4.ButtonBar = {}
Bartender4.ButtonBar.prototype = ButtonBar
Bartender4.ButtonBar.defaults = defaults
local LBF = LibStub("LibButtonFacade", true)
function Bartender4.ButtonBar:Create(id, template, config)
local bar = setmetatable(Bartender4.Bar:Create(id, template, config), ButtonBar_MT)
if LBF then
bar.LBFGroup = LBF:Group("Bartender4", tostring(id))
end
return bar
end
@@ -35,7 +40,6 @@ do
optionMap = {
rows = "Rows",
padding = "Padding",
style = "Style",
}
-- retrieves a valid bar object from the barregistry table
@@ -80,15 +84,6 @@ function ButtonBar:GetOptionObject()
set = optSetter,
get = optGetter,
},
style = {
order = 59,
name = "Style",
type = "select",
desc = "Button Style",
values = Bartender4.ButtonStyle:GetStyles(),
set = optSetter,
get = optGetter,
},
rows = {
order = 70,
name = "Rows",
@@ -171,18 +166,6 @@ function ButtonBar:UpdateButtonLayout()
end
end
function ButtonBar:GetStyle()
return self.config.style
end
function ButtonBar:SetStyle(style)
if style then
self.config.style = style
end
self:ForAll("ApplyStyle", self.config.style)
end
--[[===================================================================================
Utility function
===================================================================================]]--