Simple solution: if a button "options" property exists then pass it to the UI.Button constructor. Resulting example for API would be something like: ``` new S2.UI.Dialog({ ..., buttons:[ { primary:true, label:'OK', action:someAction, options:{icons:{primary:'ui-icon-check'}} } ] } ```
Activity
slayyyyer commentedon Feb 2, 2011
Doesn't it already do that? https://github.com/madrobby/scripty2/blob/master/src/ui/controls/dialog.js#L169
colinmollenhour commentedon Feb 2, 2011
No:
https://github.com/madrobby/scripty2/blob/master/src/ui/controls/dialog.js#L192
I'm essentially talking about changing that line to:
new UI.Button(element,button.options || {});