actually apply settings when the addon loads

This commit is contained in:
Hendrik Leppkes
2007-12-09 09:56:23 +00:00
parent 80348a88b3
commit de8edf73ba
4 changed files with 11 additions and 2 deletions
+7 -1
View File
@@ -1,4 +1,4 @@
--[[ $Id: Bartender4.lua 56386 2007-12-01 14:21:40Z nevcairiel $ ]] --[[ $Id$ ]]
local Bar = Bartender4.Bar.prototype local Bar = Bartender4.Bar.prototype
local ActionBar = setmetatable({}, {__index = Bar}) local ActionBar = setmetatable({}, {__index = Bar})
@@ -60,6 +60,12 @@ function ActionBar:UpdateButtons(numbuttons)
self:UpdateButtonLayout() self:UpdateButtonLayout()
end end
ActionBar.SetButtons = ActionBar.UpdateButtons
function ActionBar:GetButtons()
return self.config.Buttons
end
-- align the buttons and correct the size of the bar overlay frame -- align the buttons and correct the size of the bar overlay frame
function ActionBar:UpdateButtonLayout() function ActionBar:UpdateButtonLayout()
local numbuttons = self.config.Buttons local numbuttons = self.config.Buttons
+1
View File
@@ -153,6 +153,7 @@ local getBar, optGetter, optSetter, optionMap, callFunc
do do
optionMap = { optionMap = {
padding = "Padding", padding = "Padding",
buttons = "Buttons",
} }
function getBar(id) function getBar(id)
+2
View File
@@ -171,6 +171,8 @@ function Bar:ApplyConfig(config)
end end
self:Lock() self:Lock()
self:LoadPosition() self:LoadPosition()
self:SetConfigScale()
self:SetConfigAlpha()
end end
function Bar:Unlock() function Bar:Unlock()
+1 -1
View File
@@ -2,7 +2,7 @@
Action Button Template Action Button Template
]] ]]
--[[ $Id: Bar.lua 56326 2007-11-30 15:11:00Z nevcairiel $ ]] --[[ $Id$ ]]
local Button = CreateFrame("CheckButton") local Button = CreateFrame("CheckButton")
local Button_MT = {__index = Button} local Button_MT = {__index = Button}