more option fun

This commit is contained in:
Hendrik Leppkes
2007-12-09 09:47:08 +00:00
parent ed969c26fe
commit 80348a88b3
4 changed files with 110 additions and 68 deletions
+12 -1
View File
@@ -64,7 +64,7 @@ end
function ActionBar:UpdateButtonLayout()
local numbuttons = self.config.Buttons
local buttons = self.buttons
local pad = self.config.Padding
local pad = self:GetPadding()
local Rows = self.config.Rows
local ButtonPerRow = math_floor(numbuttons / Rows + 0.5) -- just a precaution
@@ -86,6 +86,17 @@ function ActionBar:UpdateButtonLayout()
end
end
function ActionBar:GetPadding()
return self.config.Padding
end
function ActionBar:SetPadding(pad)
if pad then
self.config.Padding = pad
end
self:UpdateButtonLayout()
end
function ActionBar:GetAll()
return pairs(self.buttons)
end