Mercurial > wow > reaction
diff Button.lua @ 277:4e325f1ea6e1
Construct the button name in the base class
author | Flick |
---|---|
date | Wed, 11 May 2011 11:27:36 -0700 |
parents | 36a29870bf34 |
children | 5b9c0164a491 |
line wrap: on
line diff
--- a/Button.lua Wed May 11 11:11:59 2011 -0700 +++ b/Button.lua Wed May 11 11:27:36 2011 -0700 @@ -27,14 +27,17 @@ btnColumns = 12, spacing = 3 }, - barType = L["Button Bar"] + -- barType = L["Button Bar"], -- derived classes must declare + -- buttonTypeID = "Button" -- derived classes must declare } ReAction.Button = Button -- export to ReAction -function Button:New( name, config, bar, idx, inherits, buttonType ) +function Button:New( config, bar, idx, inherits, buttonType ) buttonType = buttonType or "CheckButton" + local name = format("ReAction_%s_%s_%d",bar:GetName(), self.buttonTypeID, idx) + -- create new self self = setmetatable( {