Mercurial > wow > reaction
comparison classes/PetActionButton.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 |
---|---|
54 } | 54 } |
55 | 55 |
56 -- | 56 -- |
57 -- Pet Action Button class | 57 -- Pet Action Button class |
58 -- | 58 -- |
59 local buttonTypeID = "PetAction" | |
59 local Super = ReAction.Button | 60 local Super = ReAction.Button |
60 local Pet = setmetatable( { }, { __index = Super } ) | 61 local Pet = setmetatable( |
62 { | |
63 defaultBarConfig = { | |
64 type = buttonTypeID, | |
65 btnWidth = 30, | |
66 btnHeight = 30, | |
67 btnRows = 1, | |
68 btnColumns = 10, | |
69 spacing = 8 | |
70 }, | |
71 | |
72 barType = L["Pet Action Bar"], | |
73 }, | |
74 { __index = Super } ) | |
61 ReAction.Button.PetAction = Pet | 75 ReAction.Button.PetAction = Pet |
62 | 76 |
63 function Pet:New( idx, config, bar, idHint ) | 77 function Pet:New( idx, config, bar, idHint ) |
64 local name = format("ReAction_%s_PetAction_%d",bar:GetName(),idx) | 78 local name = format("ReAction_%s_PetAction_%d",bar:GetName(),idx) |
65 | 79 |