import Panel from "./Panel";
import SceneCtrl from "../ctrls/sceneCtrl";
import { ModuleTypes } from "../types/sceneTypes";
export default class Tips extends Panel {

    public resetBtn:eui.Button;
    public closeBtn:eui.Button;

    start(data) {
        const { message, btnTxt } = data;
        this.data.message = message;
       // this.data.btnTxt = btnTxt || '确定';
    }

     get skinKey() { return 'Tips' }

    protected get closeBtns(): eui.Button[] {
        return [this['closeBtn']]
    }

    initEvents(){
        super.initEvents();
        this.resetBtn.once(egret.TouchEvent.TOUCH_TAP, this.onTouchTap_closeBtn, this);
    }

    onTouchTap_closeBtn(): any {
        super.onTouchTap_closeBtn();
        SceneCtrl.instance.change(ModuleTypes.START_SCENE);
    }
}