Mercurial > wow > reaction
diff classes/BagButton.lua @ 221:bb13624de7e1
un-namespace Bag bar config
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Sun, 21 Nov 2010 12:51:24 -0800 |
parents | e63aefb8a555 |
children | c4b134512c50 |
line wrap: on
line diff
--- a/classes/BagButton.lua Sun Nov 21 10:40:54 2010 -0800 +++ b/classes/BagButton.lua Sun Nov 21 12:51:24 2010 -0800 @@ -25,7 +25,8 @@ btnHeight = 30, btnRows = 1, btnColumns = 6, - spacing = 4 + spacing = 4, + buttons = { } }, barType = L["Bag Bar"], @@ -42,20 +43,19 @@ -- Bag Button base class -- -function BagBase:New( idx, moduleConfig, bar, idHint ) +function BagBase:New( idx, btnCfg, bar, idHint ) local name = format("ReAction_%s_Bag_%d",bar:GetName(),idx) -- use a variable private leaf implementation class -- unlike traditional OO programming, we can initialize the leaf - -- class before initializing its derived class + -- class before initializing its parent local class = Bag if idx == 1 then class = Backpack elseif idx == 6 then class = Keyring end - self = class:New(name,moduleConfig.buttons[bar:GetName()][idx], bar, idx) - self.moduleConfig = moduleConfig + self = class:New(name, btnCfg, bar, idx) local f = self:GetFrame() local config = self:GetConfig() @@ -126,12 +126,6 @@ return self end -function BagBase:GetModuleConfig() - -- this is the Bag module config structure, - -- not the config structure of the bar itself - return self.moduleConfig -end - function BagBase:GetActionID() return self.config.bagID end