45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
"use strict";
|
|
cc._RF.push(module, 'e12e1tohIhKZo3q5oqzykmg', 'cmp.guildbat.item.vs');
|
|
// Scripts/mod/guild/guildbat/cmp/cmp.guildbat.item.vs.js
|
|
|
|
"use strict";
|
|
|
|
var ItemBase = require("nx.fx.sv.expand.item");
|
|
cc.Class({
|
|
"extends": ItemBase,
|
|
properties: {
|
|
Lname: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
Rname: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
Ldetail: {
|
|
"default": null,
|
|
type: cc.Node
|
|
},
|
|
Rdetail: {
|
|
"default": null,
|
|
type: cc.Node
|
|
}
|
|
},
|
|
rebind: function rebind(_index, _data, _key) {
|
|
this._super(_index, _data, _key);
|
|
this.setData(_data);
|
|
},
|
|
setData: function setData(data) {
|
|
if (nx.dt.objEmpty(data)) {
|
|
return;
|
|
}
|
|
nx.gui.setString(this.Lname, "", data.guild_name1);
|
|
nx.gui.setString(this.Rname, "", data.guild_name2);
|
|
nx.gui.setString(this.Ldetail, "", cc.js.formatStr(nx.text.getKey("GuildBatViewItem"), data.srv_name1, data.rank1));
|
|
nx.gui.setString(this.Rdetail, "", cc.js.formatStr(nx.text.getKey("GuildBatViewItem"), data.srv_name2, data.rank2));
|
|
|
|
//後續可能要顯示勝負
|
|
}
|
|
});
|
|
|
|
cc._RF.pop(); |