Mercurial > wow > reaction
comparison classes/MultiCastButton.lua @ 218:e63aefb8a555
Demodularization of buttons
- register class instead of config
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Fri, 19 Nov 2010 23:06:24 -0800 |
| parents | b9efc447fa27 |
| children | d08a74e86c96 |
comparison
equal
deleted
inserted
replaced
| 217:9c0691e91488 | 218:e63aefb8a555 |
|---|---|
| 298 -- | 298 -- |
| 299 -- MultiCast Button class | 299 -- MultiCast Button class |
| 300 -- Inherits implementation methods from Action button class, but circumvents the constructor | 300 -- Inherits implementation methods from Action button class, but circumvents the constructor |
| 301 -- and redefines/removes some methods. | 301 -- and redefines/removes some methods. |
| 302 -- | 302 -- |
| 303 local buttonTypeID = "Totem" | |
| 303 local Super = ReAction.Button | 304 local Super = ReAction.Button |
| 304 local Action = ReAction.Button.Action | 305 local Action = ReAction.Button.Action |
| 305 local MultiCast = setmetatable( { }, { __index = Action } ) | 306 local MultiCast = setmetatable( |
| 307 { | |
| 308 defaultBarConfig = { | |
| 309 type = buttonTypeID, | |
| 310 btnWidth = 36, | |
| 311 btnHeight = 36, | |
| 312 btnRows = 1, | |
| 313 btnColumns = 6, | |
| 314 spacing = 3 | |
| 315 }, | |
| 316 | |
| 317 barType = L["Totem Bar"], | |
| 318 }, | |
| 319 { __index = Action } ) | |
| 306 ReAction.Button.MultiCast = MultiCast | 320 ReAction.Button.MultiCast = MultiCast |
| 307 | 321 |
| 308 function MultiCast:New( idx, btnConfig, bar ) | 322 function MultiCast:New( idx, btnConfig, bar ) |
| 309 local maxIndex = bar.nTotemSlots or 0 | 323 local maxIndex = bar.nTotemSlots or 0 |
| 310 if bar.summonSlot then | 324 if bar.summonSlot then |
