comparison classes/ActionButton.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 77858d975df6
children a4e7475633b3
comparison
equal deleted inserted replaced
217:9c0691e91488 218:e63aefb8a555
168 } 168 }
169 169
170 -- 170 --
171 -- Action Button class 171 -- Action Button class
172 -- 172 --
173 local buttonTypeID = "Action"
173 local Super = ReAction.Button 174 local Super = ReAction.Button
174 local Action = setmetatable( { }, { __index = Super } ) 175 local Action = setmetatable(
176 {
177 defaultBarConfig = {
178 type = buttonTypeID,
179 btnWidth = 36,
180 btnHeight = 36,
181 btnRows = 1,
182 btnColumns = 12,
183 spacing = 3
184 },
185
186 barType = L["Action Bar"]
187 },
188 { __index = Super } )
175 ReAction.Button.Action = Action 189 ReAction.Button.Action = Action
176 190
177 function Action:New( idx, barConfig, bar, idHint ) 191 function Action:New( idx, barConfig, bar, idHint )
178 local name = format("ReAction_%s_Action_%d",bar:GetName(),idx) 192 local name = format("ReAction_%s_Action_%d",bar:GetName(),idx)
179 193