From de8edf73ba65b760ea87d753a968fa35cfaae97f Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Sun, 9 Dec 2007 09:56:23 +0000 Subject: [PATCH] actually apply settings when the addon loads --- ActionBarPrototype.lua | 8 +++++++- ActionBars.lua | 1 + Bar.lua | 2 ++ Button.lua | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ActionBarPrototype.lua b/ActionBarPrototype.lua index a547d92..8c89fa7 100644 --- a/ActionBarPrototype.lua +++ b/ActionBarPrototype.lua @@ -1,4 +1,4 @@ ---[[ $Id: Bartender4.lua 56386 2007-12-01 14:21:40Z nevcairiel $ ]] +--[[ $Id$ ]] local Bar = Bartender4.Bar.prototype local ActionBar = setmetatable({}, {__index = Bar}) @@ -60,6 +60,12 @@ function ActionBar:UpdateButtons(numbuttons) self:UpdateButtonLayout() 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 function ActionBar:UpdateButtonLayout() local numbuttons = self.config.Buttons diff --git a/ActionBars.lua b/ActionBars.lua index 71b412b..2cac708 100644 --- a/ActionBars.lua +++ b/ActionBars.lua @@ -153,6 +153,7 @@ local getBar, optGetter, optSetter, optionMap, callFunc do optionMap = { padding = "Padding", + buttons = "Buttons", } function getBar(id) diff --git a/Bar.lua b/Bar.lua index 6b5c43e..4f6d614 100644 --- a/Bar.lua +++ b/Bar.lua @@ -171,6 +171,8 @@ function Bar:ApplyConfig(config) end self:Lock() self:LoadPosition() + self:SetConfigScale() + self:SetConfigAlpha() end function Bar:Unlock() diff --git a/Button.lua b/Button.lua index 371421d..0588c80 100644 --- a/Button.lua +++ b/Button.lua @@ -2,7 +2,7 @@ Action Button Template ]] ---[[ $Id: Bar.lua 56326 2007-11-30 15:11:00Z nevcairiel $ ]] +--[[ $Id$ ]] local Button = CreateFrame("CheckButton") local Button_MT = {__index = Button}