Mercurial > wow > reaction
comparison classes/VehicleExitButton.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 | df68b5a40490 |
| children | d08a74e86c96 |
comparison
equal
deleted
inserted
replaced
| 217:9c0691e91488 | 218:e63aefb8a555 |
|---|---|
| 1 local addonName, addonTable = ... | 1 local addonName, addonTable = ... |
| 2 local ReAction = addonTable.ReAction | 2 local ReAction = addonTable.ReAction |
| 3 local L = ReAction.L | |
| 3 local format = string.format | 4 local format = string.format |
| 4 | 5 |
| 5 -- | 6 -- |
| 6 -- VExitButton Button class | 7 -- VExitButton Button class |
| 7 -- | 8 -- |
| 9 local buttonTypeID = "VehicleExit" | |
| 8 local Super = ReAction.Button | 10 local Super = ReAction.Button |
| 9 local VExitButton = setmetatable( { }, { __index = Super } ) | 11 local VExitButton = setmetatable( |
| 12 { | |
| 13 defaultBarConfig = { | |
| 14 type = buttonTypeID , | |
| 15 btnWidth = 36, | |
| 16 btnHeight = 36, | |
| 17 btnRows = 1, | |
| 18 btnColumns = 1, | |
| 19 spacing = 3 | |
| 20 }, | |
| 21 | |
| 22 barType = L["Exit Vehicle Floater"], | |
| 23 }, | |
| 24 { __index = Super } ) | |
| 10 ReAction.Button.VehicleExit = VExitButton | 25 ReAction.Button.VehicleExit = VExitButton |
| 11 | 26 |
| 12 function VExitButton:New( idx, config, bar ) | 27 function VExitButton:New( idx, config, bar ) |
| 13 local name = format("ReAction_%s_VehicleExit_%d",bar:GetName(),idx) | 28 local name = format("ReAction_%s_VehicleExit_%d",bar:GetName(),idx) |
| 14 | 29 |
