Mercurial > wow > reaction
diff Bar.lua @ 286:77609bfa804e stable
Merge 1.1 beta 8 to stable
author | Flick |
---|---|
date | Sat, 11 Jun 2011 10:57:00 -0700 |
parents | f2ed8a8e2320 |
children | d931fa418e17 |
line wrap: on
line diff
--- a/Bar.lua Wed May 11 09:53:48 2011 -0700 +++ b/Bar.lua Sat Jun 11 10:57:00 2011 -0700 @@ -1,5 +1,5 @@ -local addonName, addonTable = ... -local ReAction = addonTable.ReAction +local _, ns = ... +local ReAction = ns.ReAction local L = ReAction.L local LKB = ReAction.LKB local _G = _G @@ -7,9 +7,9 @@ local floor = math.floor local fmod = math.fmod local format = string.format -local tfetch = addonTable.tfetch -local tbuild = addonTable.tbuild -local fieldsort = addonTable.fieldsort +local tfetch = ns.tfetch +local tbuild = ns.tbuild +local fieldsort = ns.fieldsort local LSG = LibStub("ReAction-LibShowActionGrid-1.0") @@ -351,6 +351,9 @@ if w > 0 and h > 0 then self.config.btnWidth = w self.config.btnHeight = h + for _, b in pairs(self.buttons) do + b:Refresh() + end end end @@ -368,8 +371,11 @@ end function Bar:SetButtonGrid(r,c,s) + local cfg = self.config + r = r or cfg.btnRows + c = c or cfg.btnColumns + s = s or cfg.spacing if r > 0 and c > 0 and s > 0 then - local cfg = self.config cfg.btnRows = r cfg.btnColumns = c cfg.spacing = s @@ -403,6 +409,7 @@ b:ShowGridTemp(mode) b:UpdateActionIDLabel(mode) end + self.buttonClass:SetupBar(self) -- force a full refresh end function Bar:SetKeybindMode(mode) @@ -667,10 +674,10 @@ end if enable then if not self.unitwatch then - RegisterUnitWatch(self:GetFrame(),true) + RegisterUnitWatch(f,true) end elseif self.unitwatch then - UnregisterUnitWatch(self:GetFrame()) + UnregisterUnitWatch(f) end self.unitwatch = enable self:RefreshSecureState()