private MobileChatLogMessageFrame CreateMessage(MobileChatLogMessageFrame prefab, string message, Color color)
    {
        MobileChatLogMessageFrame frame = this.CreateMessage(prefab, message);

        frame.Color = color;
        return(frame);
    }
    private void AddSystemMessage(string message, Color color)
    {
        MobileChatLogMessageFrame item = this.CreateMessage(this.prefabs.systemMessage, message, color);

        this.messageFrames.Add(item);
        this.OnMessagesAdded();
    }
 private void AssignMessageFrameNames()
 {
     for (int i = 0; i < this.messageFrames.Count; i++)
     {
         MobileChatLogMessageFrame component = this.messageFrames[i].GetComponent <MobileChatLogMessageFrame>();
         component.name = string.Format("MessageFrame {0} ({1})", i, component.Message);
     }
 }
    private void AddWhisperMessage(BnetWhisper whisper)
    {
        string message = ChatUtils.GetMessage(whisper);
        MobileChatLogMessageFrame prefab = !whisper.IsSpeaker(this.receiver) ? this.prefabs.myMessage : this.prefabs.theirMessage;
        MobileChatLogMessageFrame item   = this.CreateMessage(prefab, message);

        this.messageFrames.Add(item);
    }
    private void AddMyMessage(string message)
    {
        string str = ChatUtils.GetMessage(message);
        MobileChatLogMessageFrame item = this.CreateMessage(this.prefabs.myMessage, str);

        this.messageFrames.Add(item);
        this.OnMessagesAdded();
    }
    private MobileChatLogMessageFrame CreateMessage(MobileChatLogMessageFrame prefab, string message)
    {
        MobileChatLogMessageFrame c = UnityEngine.Object.Instantiate <MobileChatLogMessageFrame>(prefab);

        c.Width   = (this.messageFrames.ClipSize.x - this.messageFrames.padding.x) - 10f;
        c.Message = message;
        SceneUtils.SetLayer(c, GameLayer.BattleNetChat);
        return(c);
    }