import { ModuleTypes } from './../types/sceneTypes';
import { NetManager } from "../../libs/tw/manager/NetManager";
import Panel from "../views/Panel";
import SceneCtrl from '../ctrls/sceneCtrl';
export default class Toast extends Panel {

    public toastMark=true;

    set message(val) {

    }
    set btnTxt(val) {

    }

    public bg: eui.Rect;
    public msgTxt: eui.Label;

    start(data?) {
        this.data.message = data ? (data.msg ? data.msg : '网络出现问题') : '网络出现问题';
        this.data.time = data ? (data.time ? data.time : 1000) : 1000;
        // this['msgTxt'].text = `${this.data.message}`;

        this.msgTxt.text = this.data.message;
        setTimeout(() => {
            this.hidePanel();
        }, this.data.time);
    }




    public get skinKey() { return 'Toast' }
}