71 lines
1.9 KiB
JavaScript
71 lines
1.9 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, '46a5b8CnkNC6oVNOcxjDUM3', 'cmp.hallows.item.info');
|
|
// Scripts/mod/partner/hallows/cmp/cmp.hallows.item.info.js
|
|
|
|
"use strict";
|
|
|
|
var ItemBase = require("nx.fx.sv.expand.item");
|
|
var TAG_TXT = ["HallowLv", "HallowSkill", "HallowRefine"];
|
|
cc.Class({
|
|
"extends": ItemBase,
|
|
properties: {
|
|
info: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
detail: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
info_name: {
|
|
"default": null,
|
|
type: cc.Label
|
|
},
|
|
info_lv: {
|
|
"default": null,
|
|
type: cc.RichText
|
|
},
|
|
detail_name: {
|
|
"default": null,
|
|
type: cc.Label
|
|
},
|
|
detail_desc: {
|
|
"default": null,
|
|
type: cc.Label
|
|
}
|
|
},
|
|
// LIFE-CYCLE CALLBACKS:
|
|
// onLoad () {},
|
|
start: function start() {},
|
|
setData: function setData(data, index, tag) {
|
|
// if(nx.dt.objEmpty(data)){
|
|
// return false;
|
|
// }
|
|
|
|
if (tag == "hallows_1") {
|
|
this.info.active = true;
|
|
this.detail.active = false;
|
|
this.info_name.string = nx.text.getKey(TAG_TXT[this.sort_index || 0]);
|
|
var str = 0;
|
|
// if(data.vo){
|
|
// if(index == 0){
|
|
// str = data.vo.step;
|
|
// }else if(index == 1){
|
|
// str = data.vo.skill_lev;
|
|
// }else{
|
|
// str = data.vo.refine_lev;
|
|
// }
|
|
// }
|
|
|
|
var info_str = cc.js.formatStr("<color=#27ae10>%s</color>/%s", data, game.configs.hallows_data.data_const.lv_max.val[this.sort_index || 0]);
|
|
this.info_lv.string = info_str;
|
|
} else {
|
|
this.info.active = false;
|
|
this.detail.active = true;
|
|
this.detail_name.string = nx.text.getKey("lab_hallows_main_window_tip9") + game.configs.hallows_data.data_skill_attr[data.id][this.sort_index + 1].lev_limit;
|
|
this.detail_desc.string = game.configs.hallows_data.data_skill_attr[data.id][this.sort_index + 1].desc;
|
|
}
|
|
} // update (dt) {},
|
|
});
|
|
|
|
cc._RF.pop(); |