const BridgeWindow = require( "bridge.window" ); const NxExpand = require("nx.fx.sv.expand"); cc.Class({ extends: BridgeWindow, properties: { list:{ default:null, type:NxExpand } }, // LIFE-CYCLE CALLBACKS: // onLoad () {}, start () { }, onOpenConfigs: function( _params ) { if(_params.mod){ this.mod = _params.mod; }else{ this.delayClose(); return; } this.period = _params.period; let award_list = this.mod.vget("sevenGoalRewards"); let lev_list = game.configs.day_goals_new_data.data_make_lev_list[this.period]; if(lev_list != null){ let list = []; for(let i in lev_list){ list.push({cfg:lev_list[i],award_list:award_list,mod:this.mod}); } this.list.rebuild(list); } }, onPreClosed(){ this.list.rebuild([]); }, });