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

export default class RankListItem extends MItem {
    public labelRank: eui.Label;
    public labelNickname: eui.Label;
    public labelScore: eui.Label;

    data: {
        rank: number,
        nickName: string,
        maxScore: number
    }

    dataChanged() {
        this.labelRank.text = this.data.rank.toString();
        this.labelNickname.text = MUtils.stringOverEllipsis(this.data.nickName, 16).toString();
        this.labelScore.text = this.data.maxScore.toString();
    }
}