dynamic_create_component_zh
Holaverse edited this page Dec 19, 2015
·
1 revision
var win = this.getWindow();
var json = {
"type": "ui-button",
"name": "ui-button2-general",
"w": 200,
"h": 69,
"x": 209,
"y": 155,
"text": "ok",
"images": {
"display": 2,
"active_bg": "drawapp8/images/common/buttons/green_button_active.png",
"normal_bg": "drawapp8/images/common/buttons/green_button.png",
"disable_bg": "drawapp8/images/common/buttons/green_button.png"
}
}
var button = win.addChildWithJson(json, 0);