comparison classes/StanceButton.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 bf64e71701e2
children d08a74e86c96
comparison
equal deleted inserted replaced
217:9c0691e91488 218:e63aefb8a555
29 } 29 }
30 30
31 -- 31 --
32 -- Stance Button class 32 -- Stance Button class
33 -- 33 --
34 local buttonTypeID = "Stance"
34 local Super = ReAction.Button 35 local Super = ReAction.Button
35 local Stance = setmetatable( { }, { __index = Super } ) 36 local Stance = setmetatable(
37 {
38 defaultConfig = {
39 type = buttonTypeID,
40 btnHeight = 36,
41 btnWidth = 36,
42 btnRows = 1,
43 btnColumns = 6,
44 spacing = 3
45 },
46
47 barType = L["Stance Bar"],
48 },
49 { __index = Super } )
36 ReAction.Button.Stance = Stance 50 ReAction.Button.Stance = Stance
37 51
38 function Stance:New( idx, moduleConfig, bar, idHint ) 52 function Stance:New( idx, moduleConfig, bar, idHint )
39 local name = format("ReAction_%s_Stance_%d",bar:GetName(),idx) 53 local name = format("ReAction_%s_Stance_%d",bar:GetName(),idx)
40 54