Beispiel #1
0
    public override void FillItem(IList datas, int index)
    {
        base.FillItem(datas, index);
        ChatData data = (ChatData)datas[datas.Count - 1 - index];
        Vector3  pos  = _preChannelPos;

        _labelChannel.text = NGUIText.EncodeColor(data.chatTypeName, data.chatTypeColor);
        string text   = String.Format("[00ff00]    [{0}][-]:{1}", data.playName, data.text);
        float  height = _emoji.SetChatData(data, text);

        pos.y -= height;
        _channelPanle.localPosition = pos;
    }
Beispiel #2
0
    public override void FillItem(IList datas, int index)
    {
        base.FillItem(datas, index);
        ChatData data = (ChatData)datas[datas.Count - 1 - index];

        _labelName.text = data.playName;
        int oldHeight = _widgetText.height;

        _emoji.SetChatData(data);

        int deltaHeight = _widgetText.height - oldHeight;

        _widgetBunble.height      += deltaHeight;
        _widgetItemContent.height += deltaHeight;
        _widgetItemContent.ResizeCollider();
        UnRegistUIButton(_headIcon.gameObject);
        RefreshSelf();
    }