comparison Bar.lua @ 279:5b9c0164a491

Fixed a number of problems with drag corners in config mode - Fixed button resizing via dragging not updating until a reload - Fixed pet/stance/vehicle buttons not always displaying in config mode - Fixed error spam when making too many pet/bag buttons
author Flick
date Wed, 11 May 2011 16:19:17 -0700
parents 36a29870bf34
children f2ed8a8e2320 0ea325e616ab
comparison
equal deleted inserted replaced
277:4e325f1ea6e1 279:5b9c0164a491
349 349
350 function Bar:SetButtonSize(w,h) 350 function Bar:SetButtonSize(w,h)
351 if w > 0 and h > 0 then 351 if w > 0 and h > 0 then
352 self.config.btnWidth = w 352 self.config.btnWidth = w
353 self.config.btnHeight = h 353 self.config.btnHeight = h
354 for _, b in pairs(self.buttons) do
355 b:Refresh()
356 end
354 end 357 end
355 end 358 end
356 359
357 function Bar:GetNumButtons() 360 function Bar:GetNumButtons()
358 local r,c = self:GetButtonGrid() 361 local r,c = self:GetButtonGrid()
401 self:ShowControls(mode) 404 self:ShowControls(mode)
402 for idx, b in self:IterateButtons() do 405 for idx, b in self:IterateButtons() do
403 b:ShowGridTemp(mode) 406 b:ShowGridTemp(mode)
404 b:UpdateActionIDLabel(mode) 407 b:UpdateActionIDLabel(mode)
405 end 408 end
409 self.buttonClass:SetupBar(self) -- force a full refresh
406 end 410 end
407 411
408 function Bar:SetKeybindMode(mode) 412 function Bar:SetKeybindMode(mode)
409 self:SetSecureData("showAll",mode) 413 self:SetSecureData("showAll",mode)
410 for idx, b in self:IterateButtons() do 414 for idx, b in self:IterateButtons() do
665 if unit then 669 if unit then
666 f:SetAttribute("unit",unit) 670 f:SetAttribute("unit",unit)
667 end 671 end
668 if enable then 672 if enable then
669 if not self.unitwatch then 673 if not self.unitwatch then
670 RegisterUnitWatch(self:GetFrame(),true) 674 RegisterUnitWatch(f,true)
671 end 675 end
672 elseif self.unitwatch then 676 elseif self.unitwatch then
673 UnregisterUnitWatch(self:GetFrame()) 677 UnregisterUnitWatch(f)
674 end 678 end
675 self.unitwatch = enable 679 self.unitwatch = enable
676 self:RefreshSecureState() 680 self:RefreshSecureState()
677 end 681 end
678 682