import { ModuleTypes } from './../types/sceneTypes';
import Panel from "../views/Panel";
import { DataManager } from "../../libs/tw/manager/DataManager";
import { NetManager } from "../../libs/tw/manager/NetManager";
import Loading from "../loading/Loading";
import PanelCtrl from "../ctrls/panelCtrl";
export default class RankPanel extends Panel {
    public rankScroller:eui.Scroller;
    public rankGroup:eui.Group;
    public prizeBtn:eui.Button;
    public closeBtn:eui.Button;

    public intoRankLb0:eui.Label;
    public nickNameLb:eui.Label;
    public intoRankLb1:eui.Label;
    public totalScoreLb:eui.Label;

    private rankTimesPlugId:number;

    public get skinKey() { return 'RankPanel' }
    public get groupName() { return 'rank_panel' }

    constructor(data: any) {
        super(data);
    }

    onSkinComplete(): void {
        super.onSkinComplete();

        this.once(egret.Event.ADDED_TO_STAGE, this.onLoad, this);
        if (this.stage) {
            this.onLoad();
        }

        this.showAct();
    }

    start(): void {
        this.percentHeight = 100;
    }

    initEvents(): void {
        super.initEvents();
        this.prizeBtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_prizeBtn, this);
    }

    removeEvents(): void {
        super.removeEvents();
        this.prizeBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP, this.onTap_prizeBtn, this);
    }

    private onLoad():void{
        this.initUI();
    }

    private initUI():void{
        this.initRankList();
        
    }

    private initRankList():void{
    }


    private onTap_prizeBtn():void{
        console.log('点击了立即领取');
        PanelCtrl.instance.btnDelay(this.prizeBtn);
    }
    
}