40 lines
940 B
JavaScript
40 lines
940 B
JavaScript
"use strict";
|
|
cc._RF.push(module, 'ada46Aj2N5Nz6LW8kr9l8Pb', 'pop.rule.wnd');
|
|
// Scripts/mod/tips/popup/pop.rule.wnd.js
|
|
|
|
"use strict";
|
|
|
|
var BridgeWindow = require("bridge.window");
|
|
cc.Class({
|
|
"extends": BridgeWindow,
|
|
properties: {
|
|
content: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
item: {
|
|
"default": null,
|
|
type: cc.Node
|
|
}
|
|
},
|
|
// LIFE-CYCLE CALLBACKS:
|
|
// onLoad () {},
|
|
start: function start() {},
|
|
onOpenConfigs: function onOpenConfigs(explain) {
|
|
for (var i in explain) {
|
|
var item_data = explain[i];
|
|
if (!nx.dt.objEmpty(item_data)) {
|
|
var nd = cc.instantiate(this.item);
|
|
nd.parent = this.content;
|
|
nd.x = 0;
|
|
nx.gui.setString(nd, "title", item_data.title);
|
|
nx.gui.setString(nd, "desc", item_data.desc);
|
|
}
|
|
}
|
|
},
|
|
onPreClosed: function onPreClosed() {
|
|
this.content.removeAllChildren();
|
|
} // update (dt) {},
|
|
});
|
|
|
|
cc._RF.pop(); |