const BridgeWindow = require( "bridge.window" ) const FxSVC = require( "nx.fx.sv.expand" ); cc.Class( { extends: BridgeWindow, properties: { list: { default: null, type: FxSVC }, ti:{ default:null, type:cc.Node } }, // LIFE-CYCLE CALLBACKS: onLoad() { }, onOpenConfigs(params) { if(!params){ this.delayClose(); return; } this.camp_id = params.camp_id; let cfgs = params.config; if(!cfgs){ this.delayClose(); return; } let info = cfgs.data_info[params.camp_id]; if(info){ if(info.type == 1){ nx.gui.setString(this.ti,"",nx.text.getKey("btn_buff_fight_number")); }else if(info.type == 2){ nx.gui.setString(this.ti,"",nx.text.getKey("btn_buff_savehp_number")); } } let list = []; for(let i in params.list){ let ob = {}; ob.info = params.list[i]; ob.cfg = cfgs; list.push(ob); } this.list.svcKey = this.camp_id; this.list.rebuild(list); }, onPreClosed() { this.list.rebuild( [] ); }, // update (dt) {}, } );