42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
const 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(_index, _data, _key){
|
|
this._super(_index, _data, _key);
|
|
this.setData(_data);
|
|
},
|
|
|
|
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));
|
|
|
|
//後續可能要顯示勝負
|
|
},
|
|
});
|