55 lines
1.2 KiB
JavaScript
55 lines
1.2 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, 'd7164fHUNJC/JQJwYTGMa+I', 'pop.preview.items.wnd');
|
|
// Scripts/mod/tips/popup/pop.preview.items.wnd.js
|
|
|
|
"use strict";
|
|
|
|
/******************************************************************
|
|
*
|
|
* 奖励界面
|
|
*
|
|
******************************************************************/
|
|
|
|
var FxLay = require("cmp.item.layout");
|
|
var BridgeWindow = require("bridge.window");
|
|
cc.Class({
|
|
"extends": BridgeWindow,
|
|
properties: {
|
|
nodTip: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
lstSL: {
|
|
"default": null,
|
|
type: FxLay
|
|
},
|
|
lstML: {
|
|
"default": null,
|
|
type: FxLay
|
|
}
|
|
},
|
|
// 重载:参数打开
|
|
onOpenConfigs: function onOpenConfigs(_params) {
|
|
// 判空
|
|
this.items = _params.items || [];
|
|
if (nx.dt.arrEmpty(this.items)) {
|
|
this.close();
|
|
nx.error("[PREVIEW]无效的道具表!");
|
|
return;
|
|
}
|
|
|
|
// 标题
|
|
if (nx.dt.strEmpty(_params.tip)) {
|
|
nx.gui.setString(this.nodTip, "", nx.text.getKey(_params.tip));
|
|
}
|
|
|
|
// 道具刷新
|
|
var ml = this.items.length > 3;
|
|
var lst = ml ? this.lstML : this.lstSL;
|
|
nx.gui.setActive(this.lstML, "", ml);
|
|
nx.gui.setActive(this.lstSL, "", !ml);
|
|
lst.rebuild(this.items);
|
|
}
|
|
});
|
|
|
|
cc._RF.pop(); |