comparison modules/ReAction_PetAction/ReAction_PetAction.lua @ 75:06cd74bdc7da

- Cleaned up Bar interface - Move all attribute setting from Bar into State - Separated Moonkin and Tree of Life - Removed PossessBar module - Added some infrastructure for paged/mind control support to Action
author Flick <flickerstreak@gmail.com>
date Mon, 16 Jun 2008 18:46:08 +0000
parents 768be7eb22a0
children da8ba8783924
comparison
equal deleted inserted replaced
74:00e28094e1a3 75:06cd74bdc7da
82 end 82 end
83 if btns[i] == nil then 83 if btns[i] == nil then
84 local ok, b = pcall(self.BtnClass.new, self.BtnClass, bar, i, btnCfg[i]) 84 local ok, b = pcall(self.BtnClass.new, self.BtnClass, bar, i, btnCfg[i])
85 if ok and b then 85 if ok and b then
86 btns[i] = b 86 btns[i] = b
87 bar:AddButton(i,b)
87 end 88 end
88 else 89 else
89 btns[i]:Refresh(bar,i) 90 btns[i]:Refresh(bar,i)
90 end 91 end
91 end 92 end
92 for i = n+1, #btns do 93 for i = n+1, #btns do
93 if btns[i] then 94 if btns[i] then
95 bar:RemoveButton(b)
94 btns[i] = btns[i]:Destroy() 96 btns[i] = btns[i]:Destroy()
95 if btnCfg[i] then 97 if btnCfg[i] then
96 btnCfg[i] = nil 98 btnCfg[i] = nil
97 end 99 end
98 end 100 end
294 self.config = nil 296 self.config = nil
295 self.bar = nil 297 self.bar = nil
296 end 298 end
297 299
298 function Button:Refresh(bar,idx) 300 function Button:Refresh(bar,idx)
299 bar:PlaceButton(self.frame, idx, 30, 30) 301 bar:PlaceButton(self, 30, 30)
300 self:Update() 302 self:Update()
301 self:UpdateHotkey() 303 self:UpdateHotkey()
302 end 304 end
303 305
304 function Button:GetFrame() 306 function Button:GetFrame()