import { DataManager } from "../../../libs/tw/manager/DataManager";

export default class Tips extends eui.Label {
    constructor() {
        super();
        this.horizontalCenter = "0";
        this.width = 750;
        this.textAlign = "center";
        this.size = 28;
        this.y = 1100-50;

        this.updateText();
        DataManager.ins.addEventListener('dataUpdate', this.updateText, this);
    }

    updateText() {
        if (!DataManager.ins.getInfoData) return;
        this.text = DataManager.ins.getInfoData.status.text;
    }
}