class UI_Alert extends UIBaseComponent {
	private alertMsg: eui.Label;
	public constructor() {
		super();
	}

	/**
	 * 绑定事件
	 */
	protected bindEvents(): void {
		super.bindEvents();
	}

	/**
	 * 创建完成时调用
	 */
	protected onCreate(): void {
		super.onCreate();
		this.x = (GameMgr.instance.main.stage.stageWidth - this.width) / 2;
		this.y = (GameMgr.instance.main.stage.stageHeight - this.height) / 3;
		this.render();
		this.onLangChange();
	}

	/**
	 * 渲染UI时调用
	 */
	protected render(): void {

	}

	/**
	 * 改变语言时调用
	 */
	protected onLangChange(ev?: egret.Event): void {
		let lang = Lang.instance.lang();
	}

	public showAlert(msg: string): void {
		this.alertMsg.text = msg;
		this.visible = true;
	}

	public hideAlert(): void {
		this.visible = false;
	}

	/**
	 * 界面关闭时调用
	 */
	public onClose(): void {
	}
}