import { MUtils } from "../MUtils";
import MItem from "../components/MItem";

export default class ListenMusicItem extends MItem {
    public avatarGroup:eui.Group;
    public musicName:eui.Label;
    public singer:eui.Label;
    public btnOk:eui.Button;
    public lableMask:eui.Rect;


    dataChanged() {
        this.musicName.text = this.data["musicName"];
        this.singer.text = this.data["singer"];
        this.musicName.mask=this.lableMask;
    }

    protected onSkinComplete() {
        this.btnOk.addEventListener(egret.TouchEvent.TOUCH_TAP, () => {
            console.log("收听歌曲：" + this.data["musicName"]);
        }, this);
    }
}