Exemplo n.º 1
0
    public void SetText(string text)
    {
        Transform transform = base.transform.FindChild("ChatText");

        if (transform != null)
        {
            this.emoticonContainer = transform.GetComponent <UIListItemContainer>();
            if (this.emoticonContainer == null)
            {
                this.emoticonContainer = transform.gameObject.AddComponent <UIListItemContainer>();
            }
            this.emoticonContainer.Delete();
            float num = 0f;
            EmoticonInfo.ParseAdEmoticon(ref this.emoticonContainer, text, this.fEmoticonScale, ref num);
        }
        if (text.Length > 0)
        {
            this.fCreateTime = Time.time;
            this.bReadyData  = true;
        }
        else
        {
            this.fCreateTime = 0f;
            this.bReadyData  = false;
        }
    }
Exemplo n.º 2
0
    public Sprite GetSprite(EmoticonType emoticon)
    {
        EmoticonInfo info = EmoticonList.Find(x => x.Emoticon == emoticon);

        if (info != null && info.Image != null)
        {
            return(info.Image);
        }
        return(null);
    }