Mercurial > wow > reaction
diff Bar.lua @ 287:0ea325e616ab
Fix LibButtonFacade initialization order
author | Flick |
---|---|
date | Fri, 01 Jul 2011 14:31:41 -0700 |
parents | 5b9c0164a491 |
children | d931fa418e17 |
line wrap: on
line diff
--- a/Bar.lua Wed May 11 16:19:17 2011 -0700 +++ b/Bar.lua Fri Jul 01 14:31:41 2011 -0700 @@ -192,6 +192,19 @@ f:SetClampedToScreen(true) LSG:AddFrame(f) + if ReAction.LBF then + local g = ReAction.LBF:Group(L["ReAction"], self.name) + self.config.ButtonFacade = self.config.ButtonFacade or { + skinID = "Blizzard", + backdrop = true, + gloss = 0, + colors = {}, + } + local c = self.config.ButtonFacade + g:Skin(c.skinID, c.gloss, c.backdrop, c.colors) + self.LBFGroup = g + end + -- secure handlers f:Execute(_reaction_init) f:SetAttribute("_onstate-reaction", _onstate_reaction) @@ -210,23 +223,13 @@ end self:ApplyAnchor() - self:SetConfigMode(ReAction:GetConfigMode()) - self:SetKeybindMode(ReAction:GetKeybindMode()) - - if ReAction.LBF then - local g = ReAction.LBF:Group(L["ReAction"], self.name) - self.config.ButtonFacade = self.config.ButtonFacade or { - skinID = "Blizzard", - backdrop = true, - gloss = 0, - colors = {}, - } - local c = self.config.ButtonFacade - g:Skin(c.skinID, c.gloss, c.backdrop, c.colors) - self.LBFGroup = g + if ReAction:GetConfigMode() then + self:SetConfigMode(true) end - ReAction.RegisterCallback(self, "OnConfigModeChanged") + if ReAction:GetKeybindMode() then + self:SetKeybindMode(true) + end buttonClass:SetupBar(self) self:ApplyStates()