Mercurial > wow > reaction
comparison Bar.lua @ 86:f32e2375e39b
Added Bar:GetNumButtons() convenience method
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 27 Jun 2008 18:40:40 +0000 |
parents | 5b7fd67a28ea |
children | 7cabc8ac6c16 |
comparison
equal
deleted
inserted
replaced
85:913857b7e123 | 86:f32e2375e39b |
---|---|
159 local c = cfg.btnColumns or 1 | 159 local c = cfg.btnColumns or 1 |
160 local s = cfg.spacing or 4 | 160 local s = cfg.spacing or 4 |
161 return r,c,s | 161 return r,c,s |
162 end | 162 end |
163 | 163 |
164 function Bar:GetNumButtons() | |
165 local r,c = self:GetButtonGrid() | |
166 return r*c | |
167 end | |
168 | |
164 function Bar:SetButtonGrid(r,c,s) | 169 function Bar:SetButtonGrid(r,c,s) |
165 if r > 0 and c > 0 and s > 0 then | 170 if r > 0 and c > 0 and s > 0 then |
166 local cfg = self.config | 171 local cfg = self.config |
167 cfg.btnRows = r | 172 cfg.btnRows = r |
168 cfg.btnColumns = c | 173 cfg.btnColumns = c |