Mercurial > wow > reaction
diff Bar.lua @ 94:39265b16d208
Fixed handling of pet buttons past 10
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 17 Oct 2008 23:46:30 +0000 |
parents | 7cabc8ac6c16 |
children | 890e4c4ab143 |
line wrap: on
line diff
--- a/Bar.lua Fri Oct 17 23:13:44 2008 +0000 +++ b/Bar.lua Fri Oct 17 23:46:30 2008 +0000 @@ -162,6 +162,15 @@ ReAction:RefreshBar(self) end +function Bar:ClipNButtons( n ) + local cfg = self.config + local r = cfg.btnRows or 1 + local c = cfg.btnColumns or 1 + + cfg.btnRows = ceil(n/c) + cfg.btnColumns = min(n,c) +end + function Bar:GetName() return self.name end